autoconf-archive-maintainers | |
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch #9572] ax_cxx_compile_stdcxx.m4: Drop the check for default C++ v
From: |
Krzesimir Nowak |
Subject: |
[patch #9572] ax_cxx_compile_stdcxx.m4: Drop the check for default C++ version support |
Date: |
Wed, 21 Feb 2018 09:39:21 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0 |
URL:
<http://savannah.gnu.org/patch/?9572>
Summary: ax_cxx_compile_stdcxx.m4: Drop the check for default
C++ version support
Project: GNU Autoconf Archive
Submitted by: krnowak
Submitted on: Wed 21 Feb 2018 02:39:20 PM UTC
Priority: 5 - Normal
Status: None
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
The problem with the check is that it can't detect whether the version is with
extensions or not. So it can't take the "noext" or "ext" option into account.
This may be a problem when an extended version of C++ has a feature that
conflicts with another feature from the C++ standard and we have no way to
tell the macro to add a "-std" flag anyway.
An example:
using namespace std::complex_literals;
std::complex<double> c = 1.0;
c += 1.0i;
std::cout << "abs" << c << " = " << abs(c) << '\n';
Here, the "1.0i" constant is either a GCC extension if compiled with
-std=gnu++14 or a standard C++ operator if compiled with -std=c++14. If a GCC
extension is used, the snippet fails to compile. Unfortunately, recent GCC
versions default to gnu++14, so this code fails to compile by default.
Dropping the check forces the macro to evaluate compiler flags with taking the
"ext"/"noext" option into account.
Issue spotted by Frédéric Mangano-Tarumi.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Wed 21 Feb 2018 02:39:20 PM UTC Name:
0001-ax_cxx_compile_stdcxx.m4-Drop-the-check-for-default-.patch Size: 3KiB
By: krnowak
<http://savannah.gnu.org/patch/download.php?file_id=43377>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?9572>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [patch #9572] ax_cxx_compile_stdcxx.m4: Drop the check for default C++ version support,
Krzesimir Nowak <=