This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: possible bug
- From: Jan Hubicka <jh at suse dot cz>
- To: Andrew Morton <akpm at digeo dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 31 Jan 2003 01:13:01 +0100
- Subject: Re: possible bug
- References: <3E39BF1D.A0D038EF@digeo.com>
> mnm:/home/akpm> cat t.c
> void foo(void);
>
> char *bar(void)
> {
> return 0;
> }
>
> char *zot(void)
> {
> return ({foo(); 0; });
> }
> mnm:/home/akpm> /usr/local/gcc-3.2.1/bin/gcc -O -Wall -c t.c
> t.c: In function `zot':
> t.c:10: warning: return makes pointer from integer without a cast
>
>
> I think the warning is bogus?
I think the value of ({foo(); 0; }) is zero (value of last statement,
if I recall the definition), so it is corect.
Honza