This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: compiler standards (and/or min gcc version) supported with installed headers ?


On Saturday 29 December 2012 15:44:49 Andreas Schwab wrote:
> Mike Frysinger writes:
> > On Saturday 29 December 2012 01:26:56 Andrew Pinski wrote:
> >> On Fri, Dec 28, 2012 at 10:01 PM, Mike Frysinger wrote:
> >> > there are also attributes unconditionally used such as:
> >> >         stdlib.h: malloc (new to gcc-3.0)
> >> >         mathcalls.h: nonnull (new to gcc-3.3)
> >> >         stdlib.h: alloc_size (new to gcc-4.3)
> >> 
> >> unknown attributes are normally ignored even with -W -Wall (though not
> >> with -Wattributes) so those should be ok.
> > 
> > yes, but it makes -Werror and such angry,
> 
> Only with -Wsystem-headers.

if your gcc supports that, yes :).  that flag is new to gcc-3.0.

it's probably not as much of an issue for glibc headers, but that flag doesn't 
work in cases with -I paths that are subdirs of /usr/include.  for example, 
with glib-2.0, you get:
$ pkg-config glib-2.0 --cflags
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include  

so when you do "#include <glib/garray.h>", that isn't considered a system 
header because it was found via the -I :(.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


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