[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fwd: sed porting trouble
From: |
Bruno Haible |
Subject: |
Re: Fwd: sed porting trouble |
Date: |
Tue, 5 Oct 2010 22:15:55 +0200 |
User-agent: |
KMail/1.9.9 |
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 @address@hidden
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
- RE: Fwd: sed porting trouble, (continued)
- RE: Fwd: sed porting trouble, Schmitz, Joachim, 2010/10/02
- Re: Fwd: sed porting trouble, Bruno Haible, 2010/10/02
- RE: Fwd: sed porting trouble, Schmitz, Joachim, 2010/10/02
- Re: Fwd: sed porting trouble, Eric Blake, 2010/10/04
- Re: Fwd: sed porting trouble, Bruno Haible, 2010/10/04
- Re: Fwd: sed porting trouble, Jim Meyering, 2010/10/05
- Re: Fwd: sed porting trouble, Eric Blake, 2010/10/05
- Re: Fwd: sed porting trouble, Jim Meyering, 2010/10/05
- Re: Fwd: sed porting trouble, Paul Eggert, 2010/10/05
- Re: Fwd: sed porting trouble, Jim Meyering, 2010/10/05
- Re: Fwd: sed porting trouble,
Bruno Haible <=
- Re: Fwd: sed porting trouble, Ralf Wildenhues, 2010/10/05
- Re: Fwd: sed porting trouble, Bruno Haible, 2010/10/05
- Re: Fwd: sed porting trouble, Ralf Wildenhues, 2010/10/05
- Re: multiline substitutions, Bruno Haible, 2010/10/05
- Re: multiline substitutions, Paul Eggert, 2010/10/05
- Re: multiline substitutions, Ralf Wildenhues, 2010/10/06
- Re: multiline substitutions, Bruno Haible, 2010/10/06
- Re: multiline substitutions, Paolo Bonzini, 2010/10/06
- Re: Fwd: sed porting trouble, Eric Blake, 2010/10/05
- Re: Fwd: sed porting trouble, Bruno Haible, 2010/10/05