On Tue, 4 Apr 2000, Paul Eggert wrote:

> The autoconf philosophy is that you shouldn't test for compiler or OS
> version; you should test for specific features.

I agree with that in principle. But how does AC_PROG_CC_GNU fit in there?
Shouldn't you *test* if the compiler supports -O2 or whatever else you're
doing? Also sometimes the same flag is used for different purposes by
different compilers and it's not always easy to just "try to compile"
(examples are warning and optimization flags). Worse, an option might
allow compilation of ANSI code but might lead to mysterious failures down
the road. In any case it seems that the information "this is an HPUX
compiler" is not at all useless.

> This should insulate you from compiler changes without your having to
> maintain a database of which compiler versions have which bugs.

(bugs => features :)

Well, what we are currently looking at is *you* maintaining a database
which is

a) incomplete
b) not extensible
c) wrong

(Note on (a): Solaris, Ultrix, Unixware, et al.)

(Note on (c): You do not want to use the -std1 option on OSF because
that's mostly equivalent to gcc -ansi -pedantic (i.e., not useful). The
correct option is -std.)


-- 
Peter Eisentraut                  Sernanders väg 10:115
[EMAIL PROTECTED]                   75262 Uppsala
http://yi.org/peter-e/            Sweden

Reply via email to