Solaris 2.8 Intel: asm error when function pointer is known tobe 0

Alan Modra alan@linuxcare.com.au
Thu Jul 20 21:28:00 GMT 2000


On Fri, 21 Jul 2000, Martin Buchholz wrote:

[snip]
> int main (int argc, char *argv[])
> {
>   /* This confuses me, so I understand why it confuses the compiler/assembler */
>   ((void (*) (void)) 0) ();
> }
[snip]
> GNU C version 2.95.2 19991024 (release) (i386-pc-solaris2.8) compiled by GNU C version 2.95.2 19991024 (release).
>  /usr/ccs/bin/as -V -Qy -s -o voidfuncrash2.o /var/tmp/cc07HbZc.s
> as: Sun WorkShop 6 99/08/16
> Assembler: voidfuncrash2.c
> 	"/var/tmp/cc07HbZc.s", line 12 : Illegal PC-relative relocation

Known gcc bug, fixed in CVS gcc for quite a while.  (I happen to know
about this one as I added a hack to x86 gas to work around the problem)

Alan Modra
-- 
Linuxcare.  Support for the Revolution.



More information about the Gcc-bugs mailing list