diff options
author | Jakub Jelinek <jakub@redhat.com> | 2023-02-07 10:23:13 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2023-02-07 10:23:13 +0100 |
commit | 64b5ca4345f6a96a8b85b8aa1cfcc9cf667eadfd (patch) | |
tree | 06b968ec8d8c31709b84d741c083adb60185f202 | |
parent | a7502c4a614238ac3f80271886b217b156bdf923 (diff) | |
download | gcc-64b5ca4345f6a96a8b85b8aa1cfcc9cf667eadfd.zip gcc-64b5ca4345f6a96a8b85b8aa1cfcc9cf667eadfd.tar.gz gcc-64b5ca4345f6a96a8b85b8aa1cfcc9cf667eadfd.tar.bz2 |
testsuite: Expect -Wdeprecated warning in warn/Wstrict-aliasing-bogus-union-2.C for C++23
On Mon, Feb 06, 2023 at 02:26:01PM +0000, Jonathan Wakely via Gcc-patches wrote:
> With the recent change to deprecate std::aligned_storage and
> std::aligned_union we need to adjust some tests that now fail with
> -std=c++23.
The g++.dg/warn/Wstrict-aliasing-bogus-union-2.C test is also affected:
PASS: g++.dg/warn/Wstrict-aliasing-bogus-union-2.C -std=gnu++2b (test for bogus messages, line 12)
FAIL: g++.dg/warn/Wstrict-aliasing-bogus-union-2.C -std=gnu++2b (test for excess errors)
Excess errors:
.../gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-union-2.C:8:8: warning: 'template<long unsigned int _Len, long unsigned int _Align> struct std::aligned_storage' is deprecated [-
The following patch adds dg-warning for it.
2023-02-07 Jakub Jelinek <jakub@redhat.com>
* g++.dg/warn/Wstrict-aliasing-bogus-union-2.C: Expect
-Wdeprecated warning for C++23.
-rw-r--r-- | gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-union-2.C | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-union-2.C b/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-union-2.C index 2b4895a..e0a27e8 100644 --- a/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-union-2.C +++ b/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-union-2.C @@ -5,7 +5,7 @@ struct foo { - std::aligned_storage<sizeof(long), alignof(long)>::type raw; + std::aligned_storage<sizeof(long), alignof(long)>::type raw; /* { dg-warning "deprecated" "" { target c++23 } } */ long& cooked() { |