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: Canonicalization of function pointers


> "John David Anglin" <dave@hiauly1.hia.nrc.ca> writes:
> 
> |> The code snippet below demonstrates a problem in comparing a void *
> |> to a function pointer.  I believe this is a gcc extension and is not
> |> allowed in ISO C.
> 
> Yes, it is even a constraint violation:
> 
> 6.5.9 Equality operators

Yes.  I had read this section prior to sending the message.  Gcc seems
to be following the conversion specified in paragraph 5 but this doesn't
make any sense for function pointers which need canonicalization.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


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