Bad code for ia64 with function pointer

Jim Wilson wilson@redhat.com
Fri Aug 9 08:38:00 GMT 2002


Your program is broken.  You made assumptions about the form of a function
pointer which are wrong.

On IA-64, and some other targets, function pointers are represented
differently than pointers to objects.  On IA-64, a function pointer is a double
word descriptor that holds the function address and the function GP value.
Thus you can't get a valid function pointer by casting a char * pointer to a
function pointer type.

Jim



More information about the Gcc mailing list