autoconf
[Top][All Lists]
Advanced

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

Re: [patch] Extend AC_PROG_CXX to check for standards conformance


From: Paul Eggert
Subject: Re: [patch] Extend AC_PROG_CXX to check for standards conformance
Date: Mon, 21 Jan 2013 22:38:15 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2

On 01/21/2013 12:36 PM, Roger Leigh wrote:
> For C stuff like
> const/restrict/volatile/inline, it's possible to achieve this
> fairly simply, and autoconf does a very good job here.
> 
> However, if you look at the C++11 features like declspec,
> automatic type inference, array initialisers, delegate
> constructors, range-based for loops, lambdas, etc. these
> features can not be substituted for.

C++11 is not materially different from C11 in
this respect.  C11 has features such as _Generic,
_Thread_local, anonymous unions, _Atomic, etc.,
that also can't be substituted for.

And this issue isn't new to C11.  C99 has many features,
such as variable length arrays and 'long long', that
simply can't be implemented via macro substitutes in
C89-only systems.  If you want to use variable length
arrays, you really need a compiler that supports them.

So there's nothing new here.  Some features can be
backported, others can't.  But that doesn't mean Autoconf
should be encouraging the use of obsolete standards.

> I have no reason not to use C++11 features today.  The
> only current thing preventing this is lack of portable support
> for it in autoconf

This is a good argument for Autoconf encouraging the use of the
latest C++ version.   But it's not an argument for Autoconf
encouraging the use of some *older* C++ version.

On 01/21/2013 04:01 PM, Miles Bader wrote:
> If you need C++11 features and don't have any compatibility fallbacks,
> isn't following the autoconf language test in configure.ac by
> "if not c++11 then AC_ERROR([BARF! Need a C++11 compiler!])"  good
> enough?

Yes, that's the right question.



reply via email to

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