[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: Thu, 02 Dec 2004 11:57:13 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Roger Leigh <address@hidden> writes:

> +  for (unsigned int i = 0; *(text+i) != '\0'; ++i);

Please put a "continue" before the ";", to forestall warnings from
some compilers.

> +# GCC                -std=gnu99 -std=c99 -std=iso9899:1999
> +# AIX                -qlanglvl=extc99 -qlanglvl=stdc99
> +# Intel ICC  -c99
> +# IRIX               -c99
> +# Solaris    -xc99
> +# Tru64              -c99
> +for ac_arg in "" -std=gnu99 -std=c99 -std=iso9899:1999 -c99 -xc99 
> -qlanglvl=extc99 -qlanglvl=stdc99

Why do we need to try 3 options for GCC?  Wouldn't "-std=gnu99" do?
If possible, I'd rather not try "-std=c99" or "-std=iso9899:1999"
(which are aliases), since it might cause the compiler to become
restrictive or pedantic.  This is why the existing _AC_PROG_CC_STDC
doesn't try "gcc -ansi".

Similarly, for AIX I'd rather not try -qlanglvl=stdc99 since
-qlanglvl=extc99 does what we want.  Come to think of it, the existing
macro should use -qlanglvl=extc89 instead of -qlanglvl=ansi; I'll make
that change now.

I just checked the Solaris documentation
<>, and "-xc99"
differs from the default behavior only in that it causes the compiler
to assume C99 semantics for library functions.  But I would think that
this an unnecessary and perhaps even dangerous option in Solaris up
through Solaris 9 (the current version -- Solaris 10 has been
announced but it isn't shipping yet), since its standard C library
implements C89 semantics, not C99.  So I'd rather omit -xc99 here.
(You could put in a comment to that effect.)

Thanks for your work here.  Please let me know when the paperwork is
done, so that I can install the change and we can get it tested.

reply via email to

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