ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] Switch to C++11 or C++14

From: Michał Łabędzki <michal.tomasz.labedzki@xxxxxxxxx>
Date: Sat, 2 Jun 2018 11:26:55 +0200
 C++11 seems to be possible.

Some infos:
1. Wireshark requires at least Qt 5.2.
2. To build Qt5, from 5.7 C++11 is required:
http://code.qt.io/cgit/qt/qt5.git/tree/README?h=5.7
I assume that building application for Qt 5.7 does not require C++11.

3. Ubuntu 14.04 LTS supports GCC 4.8.4, Qt  5.2.1  - but LTS End of
Life is: April 2019  <-- C++11 is here
4. Ubuntu 16.04 LTS: GCC 5.3.1 , Qt 5.5.1, EOL: April 2021
5. Debian Jessie 8 supports GCC 4.9.2 and Qt 5.3.2, EOL: June 30, 2020
6. RHEL is safe?  Qt 5.6 - 5.11, GCC 4.9.1?
http://doc.qt.io/qt-5.6/supported-platforms.html
7. Window, macOS: supports everything :)
8. Fedora 26 (still supported?) has gcc 7.1:
https://fedoraproject.org/wiki/Changes/GCC7
9. openSUSE:13.1 gcc 4.9
http://download.opensuse.org/distribution/13.2/repo/oss/
10. SLES 12 is also not a problem (C++17?):
https://www.suse.com/c/sles-12-toolchain-update-brings-new-developer-tools/

The question is: can we require C++11 right now?

By the way: what is the minimum GCC version for Wireshark. I do not
see any check for this in CMakeLists.txt. I assume we check a lot of
compilers features instead.
pt., 1 cze 2018 o 23:38 Guy Harris <guy@xxxxxxxxxxxx> napisał(a):
>
> On Jun 1, 2018, at 2:21 PM, Michał Łabędzki <michal.tomasz.labedzki@xxxxxxxxx> wrote:
>
> > Is there (still) a problem to switch to C++11 or C++14? Petri-Dish seems to support it for Windows, but there is old standard used for Ubuntu.
>
> GCC C++ standard support:
>
>         https://gcc.gnu.org/projects/cxx-status.html#cxx11:
>
>                 "GCC 4.8.1 was the first feature-complete implementation of the 2011 C++ standard, previously known as C++0x."
>
>         https://gcc.gnu.org/projects/cxx-status.html#cxx14:
>
>                 "GCC has full support for the previous revision of the C++ standard, which was published in 2014.
>
>                 This mode is the default in GCC 6.1 and above; it can be explicitly selected with the -std=c++14 command-line flag, or -std=gnu++14 to enable GNU extensions as well."
>
>                 The table of C++14 features they have shows GCC 5 as the first version to support all the features in the table.
>
>
> Clang C++ standard support:
>
>         https://clang.llvm.org/cxx_status.html
>
>                 "Clang 3.3 and later implement all of the ISO C++ 2011 standard."
>
>                 "Clang 3.4 and later implement all of the ISO C++ 2014 standard."
>
> I don't have a list of what versions of various Linux distributions, what versions of various *BSDs, and what versions of Xcode supporting what versions of macOS have which versions of GCC and/or Clang, but that would help here in determining what OS versions are required for C++11 or C++14 support.
>
> This should perhaps go on the "support library version tracking" page, which *already* tracks things other than support libraries, such as CMake:
>
>         https://wiki.wireshark.org/Development/Support_library_version_tracking
>
> 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.
> ___________________________________________________________________________
> Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
> Archives:    https://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
>              mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe



-- 
Michał Łabędzki