[Top][All Lists]

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


From: Paul Eggert
Subject: Re: AC_PROG_CC_C99
Date: Tue, 04 Jan 2005 15:59:44 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Noah Misch <address@hidden> writes:

> Do there exist compilers that accept neither C89 nor C99 by default, but that
> can accept both given options?

It depends on what you mean by "accept".  GCC doesn't accept either
language by default, as it doesn't do trigraph processing; but nobody
uses trigraphs in practice, so this is not worth worrying about.

It's possible to write valid C89 code that will break if you compile
it with a C99 compiler (e.g., "x = y//**/z;"), but it's rare enough
that it's not worth worrying about.

> will it work for AC_PROG_CC_C89 (via AC_PROG_CC) to add the
> C89-tolerance option, and for AC_PROG_CC_99 to then try to add the
> C99-tolerance option in addition?

Good question.  We'd rather have it do C99 from day one in that case,
I suppose.  Roger?

> I have been thinking, would it be better to create a new macro name, say

That wouldn't be a good name, as both C89 and C99 are ISO standards.

> Certainly nobody depends on AC_PROG_CC_STDC making the compiler
> accept C99, so perhaps we only stand to surprise people by giving it
> that meaning?

Well, it was marked as obsolete.  :-)

To be honest I don't think it'll cause that many problems, as C99 is
mostly upwards compatible with C89.  I suspect that most compilers
that can do either, will be in C99ish mode by default.

reply via email to

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