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 @[EMAIL PROTECTED] 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!