[PATCH v3] tftp.h: rework layout to work with fortification

Joseph S. Myers joseph@codesourcery.com
Mon May 7 15:51:00 GMT 2012


On Mon, 7 May 2012, Carlos O'Donell wrote:

> On Mon, May 7, 2012 at 10:38 AM, Joseph S. Myers
> <joseph@codesourcery.com> wrote:
> > On Mon, 7 May 2012, Carlos O'Donell wrote:
> >
> >> It still doesn't work with -Wall -Werror -pedantic because zero sized
> >> arrays are not allowed in ISO C.
> >
> > This should not give errors in system headers.  Have you found such an
> > error with the header installed in a system header directory?  If so, that
> > would be a GCC bug.
> 
> No, I haven't tried installing this and testing.
> 
> I didn't know that GCC had special handling for system headers.
> 
> How does that work?

Most warnings are not emitted for locations in system headers (those found 
in system header directories, with -isystem or marked with #pragma GCC 
system_header), unless -Wsystem-headers.  This applies before pedwarns are 
turned into errors.

-- 
Joseph S. Myers
joseph@codesourcery.com


More information about the Libc-alpha mailing list