[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnulib-bug
Subject:    Re: Using gnulib with -pedantic, I get many warnings about
From:       Reuben Thomas <rrt () sc3d ! org>
Date:       2008-08-25 10:26:06
Message-ID: alpine.DEB.1.00.0808251124010.20726 () drom
[Download RAW message or body]

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, namely Solaris and Interix).
>
> Incidentally, the same also happens with -isystem. (See the attached log
> of an experiment done on Solaris.)
>
> 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 @INCLUDE_NEXT@. Fortunately gnulib does not
> use __STDC__ in any of these header files any more.

Thanks for working on this, guys, this looks like an ideal solution: i.e. 
solves the problem without the user having to do anything, thus encouraging 
gnulib users to write portable code, which after all is what gnulib is 
designed to help in the first place!



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic