This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
C99 usage in gcc [was Re: build failure on mainline due to java/expr.c]
Andrew Pinski writes:
>
> On Jan 29, 2004, at 15:43, Ben Elliston wrote:
>
> > Hi Andrew
> >
> > It seems that reverting this patch of yours corrects a build failure I
> > am experiencing. I didn't bother looking any closer at it.
> >
> > 2004-01-28 Andrew Haley <aph@redhat.com>
> >
> > * expr.c (build_field_ref): Widen field offset.
>
> The problem again is that compiling a cross compiler with an older
> version of gcc, 2.95.3
> can cause an parse error as it does not support C99 of putting variable
> declaration anywhere.
> I applied this patch as obvious.
Thanks.
I didn't get a warning for this, despite compiling with "-Wall
-Werror". This strikes me as odd.
Compiling this testcase:
int foo (void)
{
int a = 99;
a++;
int b = a;
return b;
}
with "-Wall -std=c89" doesn't seem to generate any warnings either.
Andrew.