This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C99 usage in gcc


Andrew Haley <aph@redhat.com> writes:

> Zack Weinberg writes:
>  > Bruce Stephens <bruce@cenderis.demon.co.uk> writes:
>  > 
>  > >> It is a pedwarn, hence you need -pedantic also.
>  > >
>  > > Which is useful, except that it also complains about:
>  > >
>  > > #ifdef __cplusplus
>  > > // foo
>  > > #endif
>  > 
>  > As it should.  This will be misinterpreted by a plain-C89 compiler;
>  > comment stripping happens before #ifdef processing.
>
> Oh dear.  Anyway, the fact remains that there is a build-breaking
> error I regularly make (three times now) that the compiler doesn't
> warn about during bootstrap.  It seems odd that this is only a pedwarn
> for C89.

Agree; I'd take a patch to make GCC warn about this with -Wall -std={gnu,c}89.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]