No Subject
Jim Wilson
wilson@cygnus.com
Mon Apr 6 19:10:00 GMT 1998
I get an "illegal instruction" when I run the following program
after compiling it with egcs-1.0.2 on a sparc running solaris 2.4. ( It
works normally under an i586 running redhat-4.2 & egcs-1.0.2 ( compiled
on both machine as gcc -o program program.c )
The program uses builtin_apply_args/builtin_apply/builtin_return. These
are builtins for gcc internal use only, and are not safe for use in user
programs. They only place where they are intended to be used are in the
objective C runtime library (and frankly, they shouldn't even be used there
either).
The `unimp' instruction is part of the sparc calling convention. A call
to a function returning a structure must be followed by an unimp instruction.
I think the unimp is there so as to make the use of these functions in the
objective C runtime library work on the sparc.
A much better way to write your example is to use vprintf instead of printf.
Jim
More information about the Gcc-bugs
mailing list