Wireshark mailing list archives
Re: Switch to C++11 or C++14
From: Guy Harris <guy () alum mit edu>
Date: Mon, 4 Jun 2018 11:24:26 -0700
On Jun 4, 2018, at 10:51 AM, Gerald Combs <gerald () wireshark org> wrote:
On 6/1/18 2:37 PM, Guy Harris wrote:However, the problem with Ubuntu may be that the compiler in the version of Ubuntu running on the buildbot may be old enough that it doesn't *default* to C++11, so we may have to explicitly *ask* for C++11 in the CMake files.The main and fuzz test builders run Ubuntu 16.04 and have the stock gcc (5.4.0) installed. The fuzz builder additionally has clang 5.0.2 installed from the LLVM apt repository.
So those should *support* C++11, but GCC 5.5 - and presumably earlier 5.x versions - doesn't appear to *default* to C++11; the GCC 5.5 manual section on C++ language standards supported, at https://gcc.gnu.org/onlinedocs/gcc-5.5.0/gcc/Standards.html#C_002b_002b-Language says The default, if no C++ language dialect options are given, is -std=gnu++98. i.e. C++98 with GNU extensions, so we'd have to explicitly ask for C++11 by doing -std=gnu++11 (as we want the GCC extensions, as far as I know - we, or Qt, may even expect them to be there if we're compiling with GCC).
I'm planning on upgrading the main Ubuntu builder to 18.04 this week, which will give us gcc 7.3.0.
That defaults to C++14: https://gcc.gnu.org/onlinedocs/gcc-7.3.0/gcc/Standards.html#C_002b_002b-Language says The default, if no C++ language dialect options are given, is -std=gnu++14.
The macOS builder has clang 3.1 installed, so we'd have to upgrade it before mandating C++11 or 14.
If https://en.wikipedia.org/wiki/Xcode#Toolchain_versions is to be believed, Xcode prior to 4.4 has Clang 3.1 or earlier, none of which are claimed by the Clang Web site to support C++11, and Xcode 4.4 has Clang 4.0, which is claimed by the Clang Web site to support C++14. https://en.wikipedia.org/wiki/Xcode#4.x_series claims that it "runs on both Mac OS X Lion (10.7) and OS X Mountain Lion (10.8)", so the buildbot OS wouldn't have to be updated. However, https://en.wikipedia.org/wiki/Xcode#Xcode_3.0_-_Xcode_4.x claims that 4.4 doesn't have the Snow Leopard SDK, so if we're going to continue to support Snow Leopard, we'd probably have to use the Lion SDK but set the minimum deployment version to Snow Leopard. ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Switch to C++11 or C++14 Michał Łabędzki (Jun 01)
- Re: Switch to C++11 or C++14 Guy Harris (Jun 01)
- Re: Switch to C++11 or C++14 Michał Łabędzki (Jun 02)
- Re: Switch to C++11 or C++14 Gerald Combs (Jun 04)
- Re: Switch to C++11 or C++14 Guy Harris (Jun 04)
- Re: Switch to C++11 or C++14 Michael Mann via Wireshark-dev (Jun 02)
- Re: Switch to C++11 or C++14 Peter Wu (Jun 02)
- Re: Switch to C++11 or C++14 Michał Łabędzki (Jun 02)
- Re: Switch to C++11 or C++14 Michał Łabędzki (Jun 02)
- Re: Switch to C++11 or C++14 Guy Harris (Jun 02)
- Re: Switch to C++11 or C++14 Mark () verizon net (Jun 02)
- Re: Switch to C++11 or C++14 Guy Harris (Jun 02)
- Re: Switch to C++11 or C++14 Mark () verizon net (Jun 02)
- Re: Switch to C++11 or C++14 Guy Harris (Jun 01)