Hello,This patch fixes a C++26 deprecation warning in g++'s (not libstdc++) autotests.
Thanks, -- Giuseppe D'Angelo
From c1abe8e7a219e6218478249b93945c96ac81a78a Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo <giuseppe.dang...@kdab.com> Date: Tue, 10 Dec 2024 10:49:10 +0100 Subject: [PATCH] Fix some more is_trivial C++26 deprecation warnings This test was accidentally missed; simply suppress the warnings there as well. Amends 6c41a912f5e. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/trivial1.C: Suppress deprecation warnings from C++26. Signed-off-by: Giuseppe D'Angelo <giuseppe.dang...@kdab.com> --- gcc/testsuite/g++.dg/cpp0x/trivial1.C | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gcc/testsuite/g++.dg/cpp0x/trivial1.C b/gcc/testsuite/g++.dg/cpp0x/trivial1.C index 3fed57042ed..25a22472d7c 100644 --- a/gcc/testsuite/g++.dg/cpp0x/trivial1.C +++ b/gcc/testsuite/g++.dg/cpp0x/trivial1.C @@ -15,6 +15,12 @@ #include <type_traits> +// is_trivial (and the notion of "trivial class") is deprecated as of C++26. +#if __cplusplus > 202302L +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + #define TRY(expr) static_assert (expr, #expr) #define YES(type) TRY(std::is_trivial<type>::value); \ TRY(std::is_trivial<type[]>::value); \ @@ -84,3 +90,7 @@ NO(L); // PR c++/41421 struct O { O(int); }; NO(O); + +#if __cplusplus > 202302L +#pragma GCC diagnostic pop +#endif -- 2.34.1
smime.p7s
Description: S/MIME Cryptographic Signature