This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Comparing function pointers
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Bruno Haible <bruno at clisp dot org>
- Cc: gcc at gcc dot gnu dot org, Andreas Jaeger <aj at suse dot de>
- Date: Sun, 15 Jun 2003 09:02:30 -0700
- Subject: Re: Comparing function pointers
- References: <200306151751.23968.bruno@clisp.org>
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.