Tested x86_64-linux. Pushed to trunk.
-- >8 --
This test now fails in C++26 mode because the declaration in <new> is
constexpr and the one in the test isn't. Add constexpr to the test.
libstdc++-v3/ChangeLog:
PR libstdc++/115744
* testsuite/18_support/headers/new/synopsis.cc [C++26]: Add
constexpr to placement operator new and operator new[].
---
.../testsuite/18_support/headers/new/synopsis.cc | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/libstdc++-v3/testsuite/18_support/headers/new/synopsis.cc
b/libstdc++-v3/testsuite/18_support/headers/new/synopsis.cc
index 5c83956b584..479f0df12b5 100644
--- a/libstdc++-v3/testsuite/18_support/headers/new/synopsis.cc
+++ b/libstdc++-v3/testsuite/18_support/headers/new/synopsis.cc
@@ -46,8 +46,13 @@ void* operator new[](std::size_t size, const
std::nothrow_t&) throw();
void operator delete[](void* ptr) throw();
void operator delete[](void* ptr, const std::nothrow_t&) throw();
-void* operator new (std::size_t size, void* ptr) throw();
-void* operator new[](std::size_t size, void* ptr) throw();
+#if __cplusplus > 202302L
+# define CXX26_CONSTEXPR constexpr
+#else
+# define CXX26_CONSTEXPR
+#endif
+CXX26_CONSTEXPR void* operator new (std::size_t size, void* ptr) throw();
+CXX26_CONSTEXPR void* operator new[](std::size_t size, void* ptr) throw();
void operator delete (void* ptr, void*) throw();
void operator delete[](void* ptr, void*) throw();
--
2.46.0