autoconf
[Top][All Lists]
Advanced

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

Re: AC_PROG_CC_C99


From: Ralf Wildenhues
Subject: Re: AC_PROG_CC_C99
Date: Thu, 2 Dec 2004 09:24:02 +0100
User-agent: Mutt/1.4.1i

* Paul Eggert wrote on Wed, Dec 01, 2004 at 09:33:25PM CET:
> "Steven G. Johnson" <address@hidden> writes:
> 
> > (Which begs the question: shouldn't AC_PROG_CC_STDC be renamed to
> > AC_PROG_CC_C89, for consistency?)
> 
> Yes, and AC_PROG_CC_STDC should refer to the best (typically, latest)
> C standard.  That is, AC_PROG_CC_STDC should attempt to set the
> compiler into C99 mode, and failing that should attempt to set it in
> C89 mode.  So Roger, please make that part of the next revision for
> your patch.

This worries me to some extent.  While C99 is mostly backwards
compatible with C89, it has removed some deprecated things such as
  functions return implicit int,
  implicit function declaration.

Now while I don't mind if people have to fix their code to work with
that (those are non-silent errors and thus easy to find), it will
silently break Autoconf macros which use implicitly declared functions,
e.g. within deprecated AC_TRY_RUN constructs.

I don't know if there are compilers which actually error out on implicit
function declaration when in C99 mode (with no other options).

Regards,
Ralf




reply via email to

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