This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: warning when a function's address is tested?
- From: Steven Bosscher <s dot bosscher at student dot tudelft dot nl>
- Cc: Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de>, gcc-patches at gcc dot gnu dot org
- Date: Sun, 12 Oct 2003 21:35:03 +0200
- Subject: Re: warning when a function's address is tested?
- References: <20031012050523.486faa69.akpm@osdl.org> <87fzhyslip.fsf@student.uni-tuebingen.de> <1065976123.3630.49.camel@steven.lr-s.tudelft.nl> <87brsm8h1c.fsf@codesourcery.com>
Op zo 12-10-2003, om 20:09 schreef Zack Weinberg:
> Steven Bosscher <s.bosscher@student.tudelft.nl> writes:
>
> > Something like the attached patch should work, I'll propose it on
> > gcc-patches after I've tested it.
>
> Informally speaking, the patch looks good - just a couple of notes:
>
> 1) there's now code in the C front end that handles a bare
> FUNCTION_DECL - it should be found and removed.
I'm not sure that code has to be removed. The code is in
c-typeck.c:default_function_array_conversion() and perhaps (read:
likely) it is necessary in other parts in the C front end to convert
this kind of use of a function to a function address.
Gr.
Steven