pragma change breaks build

Paul Eggert eggert@cs.ucla.edu
Tue Apr 28 05:26:00 GMT 2015


Mike Frysinger wrote:
> why can't __GNUC_PREREQ be used as Joseph suggested ?

The #pragma should precede all code and macro definitions so that it applies 
uniformly across the entire compilation unit.  (We tried using the pragma more 
selectively, but that didn't work.)  So the pragma should appear before 
__GNUC_PREREQ is defined, just as it should appear before the other macro defn 
mentioned in the comment.

Possibly we could get away with including <errno.h>, then using __GNUC_PREREQ 
around the #pragma (this is because <errno.h> is fairly limited), but then we'd 
have to add another two or three lines to that comment and it's bad enough as it is.

I should mention that I also don't like all this futzing-around with pragmas, 
and would prefer the IF_LINT approach used in Gnulib and in GNU utilities (see 
<https://sourceware.org/ml/libc-alpha/2014-11/msg00611.html>).  However, that 
got shot down (see <https://sourceware.org/ml/libc-alpha/2014-11/msg00635.html>) 
by an argument similar to my satirical "Horrors!" comment earlier in this thread.



More information about the Libc-alpha mailing list