From ab011adf77e1bd003c33cf46c8ff999c22f394bd Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 29 Jan 2025 12:23:17 +0100 Subject: [PATCH] meson.build: require GCC 12 or clang 14 GCC 10 doesn't have std::make_unique_for_overwrite(), so let's drop it. --- .github/workflows/build.yml | 8 ++++---- NEWS | 2 +- doc/developer.rst | 2 +- doc/user.rst | 2 +- meson.build | 8 ++++---- src/decoder/plugins/MadDecoderPlugin.cxx | 5 ----- 6 files changed, 11 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2333ef4d47..d8eb6dc01d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,11 +41,11 @@ jobs: cxx: g++-14 packages: g++-14 meson_options: - - compiler: gcc10 + - compiler: gcc12 os: ubuntu-24.04 - cc: gcc-10 - cxx: g++-10 - packages: g++-10 + cc: gcc-12 + cxx: g++-12 + packages: g++-12 meson_options: - compiler: clang os: ubuntu-24.04 diff --git a/NEWS b/NEWS index 112b9d7c18..511001e5cd 100644 --- a/NEWS +++ b/NEWS @@ -58,7 +58,7 @@ ver 0.24 (not yet released) - alsa: require alsa-lib 1.1 or later - pipewire: map tags "Date" and "Comment" * switch to C++20 - - GCC 10 or clang 11 (or newer) recommended + - GCC 12 or clang 14 (or newer) recommended * static partition configuration * Windows - build with libsamplerate diff --git a/doc/developer.rst b/doc/developer.rst index 5f8f2550eb..8269e837c0 100644 --- a/doc/developer.rst +++ b/doc/developer.rst @@ -12,7 +12,7 @@ Code Style * indent with tabs (width 8) * don't write CPP when you can write C++: use inline functions and constexpr instead of macros * comment your code, document your APIs -* the code should be C++20 compliant, and must compile with :program:`GCC` 10 and :program:`clang` 11 +* the code should be C++20 compliant, and must compile with :program:`GCC` 12 and :program:`clang` 14 * all code must be exception-safe * classes and functions names use CamelCase; variables are lower-case with words separated by underscore diff --git a/doc/user.rst b/doc/user.rst index 7406ad777e..fbe30442e9 100644 --- a/doc/user.rst +++ b/doc/user.rst @@ -57,7 +57,7 @@ and unpack it (or `clone the git repository In any case, you need: -* a C++20 compiler (e.g. GCC 10 or clang 11) +* a C++20 compiler (e.g. GCC 12 or clang 14) * `Meson 1.0 `__ and `Ninja `__ * pkg-config diff --git a/meson.build b/meson.build index c71cb33548..204afd1374 100644 --- a/meson.build +++ b/meson.build @@ -102,10 +102,10 @@ version_cxx = vcs_tag(input: 'src/GitVersion.cxx', output: 'GitVersion.cxx') compiler = meson.get_compiler('cpp') c_compiler = meson.get_compiler('c') -if compiler.get_id() == 'gcc' and compiler.version().version_compare('<10') - warning('Your GCC version is too old. You need at least version 10.') -elif compiler.get_id() == 'clang' and compiler.version().version_compare('<11') - warning('Your clang version is too old. You need at least version 11.') +if compiler.get_id() == 'gcc' and compiler.version().version_compare('<12') + warning('Your GCC version is too old. You need at least version 12.') +elif compiler.get_id() == 'clang' and compiler.version().version_compare('<14') + warning('Your clang version is too old. You need at least version 14.') endif version_conf = configuration_data() diff --git a/src/decoder/plugins/MadDecoderPlugin.cxx b/src/decoder/plugins/MadDecoderPlugin.cxx index 67fd413a32..b7a14e2606 100644 --- a/src/decoder/plugins/MadDecoderPlugin.cxx +++ b/src/decoder/plugins/MadDecoderPlugin.cxx @@ -662,11 +662,6 @@ MadDecoder::DecodeFirstFrame(Tag *tag) noexcept { struct xing xing; -#if GCC_CHECK_VERSION(10,0) - /* work around bogus -Wuninitialized in GCC 10 */ - xing.frames = 0; -#endif - while (true) { const auto action = DecodeNextFrame(false, tag); switch (action) {