Re: Using gnulib with -pedantic, I get many warnings about #include_next

2008-08-30 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 8/29/2008 7:14 PM: > > Committed like this. I preferred to do the "#ifdef __GNUC__" at configure > time, > because that's more maintainable. Looks good. But were the changes to lock-tests and tls-tests intentional? http

Re: Using gnulib with -pedantic, I get many warnings about #include_next

2008-08-29 Thread Bruno Haible
Eric Blake wrote: > > Since -isystem is some burden on the gnulib user (not a big one, but anyway) > > I propose to add > >#ifdef __GNUC__ > ># pragma GCC system_header > >#endif > > to all gnulib headers that use @[EMAIL PROTECTED] Fortunately gnulib does > > not > > use __STDC__ in a

Re: Using gnulib with -pedantic, I get many warnings about #include_next

2008-08-25 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 8/25/2008 4:11 AM: > > Since -isystem is some burden on the gnulib user (not a big one, but anyway) > I propose to add >#ifdef __GNUC__ ># pragma GCC system_header >#endif > to all gnulib headers that use @[EMA

Re: Using gnulib with -pedantic, I get many warnings about #include_next

2008-08-25 Thread Reuben Thomas
On Mon, 25 Aug 2008, Bruno Haible wrote: Paolo Bonzini wrote: You can put "#pragma GCC system_header" in the gnulib files. However, this pragma not only affects warnings, it also causes __STDC__ to evaluate to 0 in such a file, on some platforms (those which define STDC_0_IN_SYSTEM_HEADERS, n

Re: Using gnulib with -pedantic, I get many warnings about #include_next

2008-08-25 Thread Bruno Haible
Paolo Bonzini wrote: > You can put "#pragma GCC system_header" in the gnulib files. However, this pragma not only affects warnings, it also causes __STDC__ to evaluate to 0 in such a file, on some platforms (those which define STDC_0_IN_SYSTEM_HEADERS, namely Solaris and Interix). Incidentally, t

Re: Using gnulib with -pedantic, I get many warnings about #include_next

2008-08-25 Thread Paolo Bonzini
> Reuben has chosen to set CPP_PEDANTIC to true, so in order to get rid of the > warning, he needs to make dir->origin == EXTENSION evaluate to false. > This means, specify the directory containing the built gnulib header files > with '-isystem' instead of '-I'. You can put "#pragma GCC system_

Re: Using gnulib with -pedantic, I get many warnings about #include_next

2008-08-25 Thread Paolo Bonzini
> Reuben has chosen to set CPP_PEDANTIC to true, so in order to get rid of the > warning, he needs to make dir->origin == EXTENSION evaluate to false. > This means, specify the directory containing the built gnulib header files > with '-isystem' instead of '-I'. I could try implementing somethi

Re: Using gnulib with -pedantic, I get many warnings about #include_next

2008-08-24 Thread Bruno Haible
Eric Blake wrote: > But obviously, glibc has some way of marking a header file as a system > header, so that the use of extensions such as #include_next do not trigger > gcc -pedantic warnings. Is there a #pragma that glibc uses to do that? > And should gnulib do the same? The code that emits thi

Re: Using gnulib with -pedantic, I get many warnings about #include_next

2008-08-24 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Reuben Thomas on 8/24/2008 4:47 PM: >> gnulib cannot avoid the use of #include_next. On non-glibc platforms it >> would be possible, by use of #include , >> but with glibc it is not possible, because glibc itself uses >> #include_next. Bu

Re: Using gnulib with -pedantic, I get many warnings about #include_next

2008-08-24 Thread Reuben Thomas
On Mon, 25 Aug 2008, Bruno Haible wrote: Reuben Thomas wrote: it'd need some way for gnulib to turn it off, and gnulib would then have to use it. gnulib cannot avoid the use of #include_next. On non-glibc platforms it would be possible, by use of #include , but with glibc it is not possible,

Re: Using gnulib with -pedantic, I get many warnings about #include_next

2008-08-24 Thread Bruno Haible
Reuben Thomas wrote: > it'd need some way for gnulib to turn it off, and > gnulib would then have to use it. gnulib cannot avoid the use of #include_next. On non-glibc platforms it would be possible, by use of #include , but with glibc it is not possible, because glibc itself uses #include_next.

Re: Using gnulib with -pedantic, I get many warnings about #include_next

2008-08-24 Thread Reuben Thomas
On Sun, 24 Aug 2008, James Youngman wrote: On Sun, Aug 24, 2008 at 10:52 PM, Reuben Thomas <[EMAIL PROTECTED]> wrote: Sounds interesting, but I can't find it. Have you a pointer to where this comes from? I can't find it in any obvious place. It was attached to the email to which you were repl

Re: Using gnulib with -pedantic, I get many warnings about #include_next

2008-08-24 Thread James Youngman
On Sun, Aug 24, 2008 at 10:52 PM, Reuben Thomas <[EMAIL PROTECTED]> wrote: > Sounds interesting, but I can't find it. Have you a pointer to where this > comes from? I can't find it in any obvious place. It was attached to the email to which you were replying. James.

Re: Using gnulib with -pedantic, I get many warnings about #include_next

2008-08-24 Thread Reuben Thomas
On Sun, 24 Aug 2008, Bruno Haible wrote: Hello, Reuben Thomas wrote: I compile my code with -pedantic, because I want it to work with compilers other than GCC. This means that my compiler output is littered with warnings about #include_next. gnulib is clever enough to use #include_next only

Re: Using gnulib with -pedantic, I get many warnings about #include_next

2008-08-24 Thread Bruno Haible
Hello, Reuben Thomas wrote: > I compile my code with -pedantic, because I want it to work with compilers > other than GCC. This means that my compiler output is littered with warnings > about #include_next. gnulib is clever enough to use #include_next only with compilers that support it (i.e. g