This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Canonicalization of function pointers
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: schwab at suse dot de (Andreas Schwab)
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 22 Nov 2002 12:12:45 -0500 (EST)
- Subject: 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)