Hi Paul, > Wouldn't it be simpler just to have > > @PRAGMA_SYSTEM_HEADER@ > > in the .in.h file, and then have that expand into > all the relevant pragmas, including #pragma COLUMNS?
This would imply either removing the #if __GNUC__ >= 3 guard, or using a multi-line expansion of @pragma_system_hea...@. 1) Why removing #if __GNUC__ >= 3 guard does not work: Recall that this #if exists so that the headers are as standalone as possible, with the goal that - Packages can install these headers in public locations. libunistring does this, I think some of Simon's packages as well. - Large packages can have parts compiled by GCC and other parts by a non-GCC compiler. In the second use-case, when the library gets built and installed with cc, and then gets used with gcc. @PRAGMA_SYSTEM_HEADER@ would expand to empty in the file, and then gcc would produce warnings (in -pedantic mode, IIRC) because the #pragma is absent. In the first use-case there is actually no problem (see the generation of unistring/stdint.h in libunistring/lib/Makefile.am for the reason), but we would be on very thin ice here. 2) Why a multi-line expansion of @PRAGMA_SYSTEM_HEADER@ does not work: I explained this in <http://lists.gnu.org/archive/html/bug-gnulib/2008-10/msg00296.html>. In summary, it's more robust to use a 4-line idiom here than a one-liner. Bruno