[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Selecting a C++ standard
From: |
Andrew W. Nosenko |
Subject: |
Re: Selecting a C++ standard |
Date: |
Sun, 28 Oct 2012 19:40:44 +0200 |
On Sun, Oct 28, 2012 at 5:25 PM, Florian Weimer <address@hidden> wrote:
> * Roger Leigh:
>
>> I would propose to add:
>>
>> AC_PROG_CXX_STDCXX
>> AC_PROG_CXX_CXX98
>> AC_PROG_CXX_CXXTR1 [CXX98 with additional checks for TR1 headers]
>> AC_PROG_CXX_CXX11
>>
>> With behaviour the same as the existing C macros.
>
> This would be unwise because picking the most recent
> compiler-supported standard will likely break programs on GNU/Linux.
> Switching from C++98 to C++11 changes the ABI of standard library
> templates, so it's basically an all-or-nothing choice for the entire
> system. (Other language changes can break compilation, but these are
> less obnoxious and easier to work around.)
ABI break by gcc-4.7.0 and 4.7.1 in c++11 mode was a bug (or
misfeature, call it as you want). Fixed in gcc-4.7.2.
>From http://gcc.gnu.org/gcc-4.7/changes.html :
o GCC versions 4.7.0 and 4.7.1 had changes to the C++ standard
library which affected the ABI in C++11 mode: a data member was
added to std::list changing its size and altering the
definitions of some member functions, and std::pair's move
constructor was non-trivial which altered the calling
convention for functions with std::pair arguments or return
types. The ABI incompatibilities have been fixed for GCC
version 4.7.2 but as a result C++11 code compiled with GCC
4.7.0 or 4.7.1 may be incompatible with C++11 code compiled
with different GCC versions and with C++98/C++03 code compiled
with any version.
--
Andrew W. Nosenko <address@hidden>
- Re: Selecting a C++ standard, (continued)
- Re: Selecting a C++ standard, Roger Leigh, 2012/10/28
- Re: Selecting a C++ standard, Bob Friesenhahn, 2012/10/28
- Re: Selecting a C++ standard, Adrian Bunk, 2012/10/30
- Re: Selecting a C++ standard, Nick Bowler, 2012/10/30
- Re: Selecting a C++ standard, Adrian Bunk, 2012/10/30
- Re: Selecting a C++ standard, Paul Eggert, 2012/10/30
- Re: Selecting a C++ standard, Paul Eggert, 2012/10/28
- Re: Selecting a C++ standard, Adrian Bunk, 2012/10/28
Re: Selecting a C++ standard, Adrian Bunk, 2012/10/27
Re: Selecting a C++ standard, Florian Weimer, 2012/10/28
- Re: Selecting a C++ standard,
Andrew W. Nosenko <=