diff mbox series

[committed] libstdc++: Add dg-error for new -Wdelete-incomplete diagnostics [PR115747]

Message ID 20240705112347.1030450-1-jwakely@redhat.com
State New
Headers show
Series [committed] libstdc++: Add dg-error for new -Wdelete-incomplete diagnostics [PR115747] | expand

Commit Message

Jonathan Wakely July 5, 2024, 11:23 a.m. UTC
These errors only show up when testing with -std=c++26 which isn't done
by default.

Tested x86_64-linux. Pushed to trunk.

-- >8 --

Since r15-1794-gbeb7a418aaef2e the -Wdelete-incomplete diagnostic is a
permerror instead of a (suppressed in system headers) warning. Add
dg-error directives.

libstdc++-v3/ChangeLog:

	PR c++/115747
	* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc:
	Add dg-error for new C++26 diagnostics.
---
 .../tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc       | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc b/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc
index d4cb45d0e06..a4c99ca1775 100644
--- a/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc
+++ b/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc
@@ -39,6 +39,9 @@  void test01()
   // { dg-error "incomplete" "" { target *-*-* } 600 }
 }
 
+// { dg-error "-Wdelete-incomplete" "" { target c++26 } 283 }
+// { dg-error "-Wdelete-incomplete" "" { target c++26 } 305 }
+
 // Ignore additional diagnostic given with -Wsystem-headers:
 // { dg-prune-output "has incomplete type" }
 // { dg-prune-output "possible problem detected" }