Package: libstdc++-11-dev Version: 11.2.0-12 Severity: important Dear Maintainer,
When compiling any C++20 source code using std::valarray with clang++, failed to compile with below message: --- /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/valarray:foo:var error: exception specification in declaration does not match previous declaration --- Because /usr/include/c++/11/valarray includes /usr/include/c++/11/bits/valarray_array.h . These decl. begin(valarray<_Tp>& __va) variants, but recent version (11.2.0-12) changes /usr/include/c++/11/valarray from older version (11.2.0-10) decl. of begin(). These added [[__nodiscard__]] and noexcept to recent version. These changes violates specificaton P0012R1 after C++17, clang++ checks this correctly , but g++ (<= 11) not seems to check this. See, http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0012r1.html Best regards, Ohta. -- System Information: Debian Release: bookworm/sid APT prefers unstable-debug APT policy: (500, 'unstable-debug'), (500, 'stable-security'), (500, 'unstable'), (1, 'experimental-debug'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.15.0-1-amd64 (SMP w/12 CPU threads) Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages libstdc++-11-dev depends on: ii gcc-11-base 11.2.0-12 ii libc6-dev 2.32-4 ii libgcc-11-dev 11.2.0-12 ii libstdc++6 11.2.0-12 libstdc++-11-dev recommends no packages. Versions of packages libstdc++-11-dev suggests: ii libstdc++-11-doc 11.2.0-12 -- no debconf information