bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Reuben Thomas
Subject: Re: Using gnulib with -pedantic, I get many warnings about #include_next
Date: Mon, 25 Aug 2008 11:26:06 +0100 (BST)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

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 @address@hidden 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!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]