autoconf
[Top][All Lists]
Advanced

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

Re: Feature request: AC_PROG_CC_* macros for gnu89/gnu99-compliant compi


From: Paul Eggert
Subject: Re: Feature request: AC_PROG_CC_* macros for gnu89/gnu99-compliant compiler
Date: Sat, 02 Feb 2013 11:52:53 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2

On 02/02/2013 09:09 AM, Michał Górny wrote:
> The major issue we've been having is difference in inline semantics
> between gnu89 and c99. It hit us at least with libgcrypt [1,2],
> pkg-config [3,4], e2fsprogs [5].

OK, this is a different matter than what AC_PROG_CC will do.
AC_PROG_CC will enable extensions if available.  But the
inline semantics issue is something where, if I understand things
correctly, a package explicitly wants the old GNU inline semantics
for 'inline', and doesn't want the C99 semantics for 'inline'
that is supported by clang and by newer versions of GCC.
That's not an extension: it's a change to the language.

One possibility is that Autoconf could add a macro
AC_CC_OLD_GNU_INLINE, or something like that, which
would cause 'configure' to arrange for the old GNU inline
semantics and to fail if this can't be arranged.
Is that a macro that you could write?

But maybe we don't need to have such a macro.
Aren't the packages in question intended to
be used with newer compilers?  If so, they need to be updated
to use C99 semantics for 'inline', since we can't expect every
new compiler to support the old GCC 'inline' semantics.  And then
AC_PROG_CC will already do what we want, since it'll (in the next
version of Autoconf, anyway), ask newer GCCs to use the C99-compatible
'inline' semantics.  By "newer GCCs" I mean GCC 4.3 or later, if
I'm reading the release notes correctly.



reply via email to

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