Skip to content
Snippets Groups Projects
Unverified Commit 4e1e5045 authored by Jonathan Wakely's avatar Jonathan Wakely Committed by Jonathan Wakely
Browse files

libstdc++: Add missing exception specifications in tests

Since r15-3532-g7cebc6384a0ad6 18_support/new_nothrow.cc fails in C++98 mode because G++
diagnoses missing exception specifications for the user-defined
(de)allocation functions. Add throw(std::bad_alloc) and throw() for
C++98 mode.

Similarly, 26_numerics/headers/numeric/synopsis.cc fails in C++20 mode
because the declarations of gcd and lcm are not noexcept.

libstdc++-v3/ChangeLog:

	* testsuite/18_support/new_nothrow.cc (THROW_BAD_ALLOC): Define
	macro to add exception specifications for C++98 mode.
	(NOEXCEPT): Expand to throw() for C++98 mode.
	* testsuite/26_numerics/headers/numeric/synopsis.cc (gcd, lcm):
	Add noexcept.
parent 2801a49d
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment