This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Comparing function pointers


On Sun, Jun 15, 2003 at 05:51:23PM +0200, Bruno Haible wrote:
> Hi,
> 
> In gccsummit2003-proceedings.pdf p. 116 Andreas Jaeger writes that on IA-64
> the result of comparing function pointers is unspecified. He explains it
> by saying that a function pointer is actually a pointer to a
> 
>     struct function_descriptor {
>       void* code_addr;
>       void* gp_value;
>     }
> 
> He goes on to recommend to avoid comparing function pointers in portable
> programs.

It should work on ia64. If not, file a bug. It can be a gcc, ld
and/or ld.so bug.

BTW, there is at least one known function pointer bug in gcc,
which has nothing to do with ia64:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10908

H.J.

H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]