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 withinstalled headers ?


On Wed, 9 Jan 2013, Roland McGrath wrote:

> > > Note that this doesn't remove the need to use __extension__ everywhere
> > > on 'long long' uses.
> > 
> > (There are quite a few in miscellaneous places that need __extension__ 
> > added, e.g. sysdeps/unix/sysv/linux/x86/sys/procfs.h.)
> 
> Perhaps someone would like to work on a test that verifies that every
> header can be #include'd in a variety of -std= and feature-test macro
> permutations.

I've expanded an existing entry at 
<http://sourceware.org/glibc/wiki/Development_Todo/Master> so it now says:

* Each installed header should be tested with each feature test macro; 
either a {{{#include}}} of the header should compile OK, or it should 
produce a {{{#error}}} error, but not some other kind of error.  Also test 
with {{{-pedantic -Wsystem-headers}}} and different {{{-std=}}} options; 
as far as possible, no warnings should be produced by the headers in any 
case.

(That todo list item was originally about 
<http://sourceware.org/ml/libc-alpha/2011-09/msg00063.html> - see also 
<http://sourceware.org/ml/libc-alpha/2011-10/msg00050.html> and 
<http://sourceware.org/ml/libc-alpha/2012-02/msg00720.html>, but the same 
principle of testing installed headers with different option combinations 
should detect both kinds of problem.  Note that I think the sys/timerfd.h 
issue still needs fixing, and it would be worthwhile to resubmit that 
patch if still applicable.)

You can't get completely clean results because of #include_next being used 
in cases where GCC and glibc headers of the same name include each other, 
and being warned about with -pedantic -Wsystem-headers.

-- 
Joseph S. Myers
joseph@codesourcery.com


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