This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: A user's experiences with GCC-3.4 snapshots
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Art Haas <ahaas at airmail dot net>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 16 Sep 2003 15:48:20 -0400
- Subject: Re: A user's experiences with GCC-3.4 snapshots
- References: <20030916193158.GB1420@artsapartment.org>
On Tue, Sep 16, 2003 at 02:31:58PM -0500, Art Haas wrote:
> $ cat try.c
> #include <stdio.h>
> int main() { extern void *setproctitle(); if(&setproctitle) return(0); else return(1); }
This is not a valid way to test the existence of a function, and GCC is
correct. You are declaring that there is an external symbol named
setproctitle, and asking for its address. The C standard guarantees
that the address of a function will never compare equal to NULL.
So Perl needs to be fixed.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer