gcc/libstdc++-v3/include/ext
Jonathan Wakely 1f378f6dd3 libstdc++: Stop using _GLIBCXX_USE_C99_MATH_TR1 in <cmath>
Similar to the three commits r14-908, r14-909 and r14-910, the
_GLIBCXX_USE_C99_MATH_TR1 macro is misleading when it is also used for
<cmath>, not only for <tr1/cmath> headers. It is also wrong, because the
configure checks for TR1 use -std=c++98 and a target might define the
C99 features for C++11 but not for C++98.

Add separate configure checks for the <math.h> functions using
-std=c++11 for the checks. Use the new macro defined by those checks in
the C++11-specific parts of <cmath>, and in <complex>, <random> etc.

The check that defines _GLIBCXX_NO_C99_ROUNDING_FUNCS is only needed for
the C++11 <cmath> checks, so remove that from GLIBCXX_CHECK_C99_TR1 and
only do it for GLIBCXX_ENABLE_C99.

libstdc++-v3/ChangeLog:

	* acinclude.m4 (GLIBCXX_ENABLE_C99): Add checks for C99 math
	functions and define _GLIBCXX_USE_C99_MATH_FUNCS. Move checks
	for C99 rounding functions to here.
	(GLIBCXX_CHECK_C99_TR1): Remove checks for C99 rounding
	functions from here.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* include/bits/random.h: Use _GLIBCXX_USE_C99_MATH_FUNCS instead
	of _GLIBCXX_USE_C99_MATH_TR1.
	* include/bits/random.tcc: Likewise.
	* include/c_compatibility/math.h: Likewise.
	* include/c_global/cmath: Likewise.
	* include/ext/random: Likewise.
	* include/ext/random.tcc: Likewise.
	* include/std/complex: Likewise.
	* testsuite/20_util/from_chars/4.cc: Likewise.
	* testsuite/20_util/from_chars/8.cc: Likewise.
	* testsuite/26_numerics/complex/proj.cc: Likewise.
	* testsuite/26_numerics/headers/cmath/60401.cc: Likewise.
	* testsuite/26_numerics/headers/cmath/types_std_c++0x.cc:
	Likewise.
	* testsuite/lib/libstdc++.exp (check_v3_target_cstdint):
	Likewise.
	* testsuite/util/testsuite_random.h: Likewise.
2023-05-31 21:01:16 +01:00
..
pb_ds Update copyright years. 2023-01-16 11:52:17 +01:00
algorithm Update copyright years. 2023-01-16 11:52:17 +01:00
aligned_buffer.h libstdc++: Suppress warnings about use of deprecated std::aligned_storage 2023-02-24 14:23:35 +00:00
alloc_traits.h Update copyright years. 2023-01-16 11:52:17 +01:00
atomicity.h Update copyright years. 2023-01-16 11:52:17 +01:00
bitmap_allocator.h Update copyright years. 2023-01-16 11:52:17 +01:00
cast.h Update copyright years. 2023-01-16 11:52:17 +01:00
cmath Update copyright years. 2023-01-16 11:52:17 +01:00
codecvt_specializations.h Update copyright years. 2023-01-16 11:52:17 +01:00
concurrence.h Update copyright years. 2023-01-16 11:52:17 +01:00
debug_allocator.h Update copyright years. 2023-01-16 11:52:17 +01:00
enc_filebuf.h Update copyright years. 2023-01-16 11:52:17 +01:00
extptr_allocator.h Update copyright years. 2023-01-16 11:52:17 +01:00
functional Update copyright years. 2023-01-16 11:52:17 +01:00
iterator Update copyright years. 2023-01-16 11:52:17 +01:00
malloc_allocator.h Update copyright years. 2023-01-16 11:52:17 +01:00
memory Update copyright years. 2023-01-16 11:52:17 +01:00
mt_allocator.h Update copyright years. 2023-01-16 11:52:17 +01:00
new_allocator.h Update copyright years. 2023-01-16 11:52:17 +01:00
numeric Update copyright years. 2023-01-16 11:52:17 +01:00
numeric_traits.h Update copyright years. 2023-01-16 11:52:17 +01:00
pod_char_traits.h Update copyright years. 2023-01-16 11:52:17 +01:00
pointer.h Update copyright years. 2023-01-16 11:52:17 +01:00
pool_allocator.h Update copyright years. 2023-01-16 11:52:17 +01:00
random libstdc++: Stop using _GLIBCXX_USE_C99_MATH_TR1 in <cmath> 2023-05-31 21:01:16 +01:00
random.tcc libstdc++: Stop using _GLIBCXX_USE_C99_MATH_TR1 in <cmath> 2023-05-31 21:01:16 +01:00
rb_tree Update copyright years. 2023-01-16 11:52:17 +01:00
rc_string_base.h Update copyright years. 2023-01-16 11:52:17 +01:00
rope Update copyright years. 2023-01-16 11:52:17 +01:00
ropeimpl.h Update copyright years. 2023-01-16 11:52:17 +01:00
slist Update copyright years. 2023-01-16 11:52:17 +01:00
sso_string_base.h Update copyright years. 2023-01-16 11:52:17 +01:00
stdio_filebuf.h Update copyright years. 2023-01-16 11:52:17 +01:00
stdio_sync_filebuf.h Update copyright years. 2023-01-16 11:52:17 +01:00
string_conversions.h Update copyright years. 2023-01-16 11:52:17 +01:00
throw_allocator.h libstdc++: Remove <random> dependency on _GLIBCXX_USE_C99_STDINT_TR1 2023-05-12 17:46:28 +01:00
type_traits.h Update copyright years. 2023-01-16 11:52:17 +01:00
typelist.h Update copyright years. 2023-01-16 11:52:17 +01:00
vstring.h Update copyright years. 2023-01-16 11:52:17 +01:00
vstring.tcc Update copyright years. 2023-01-16 11:52:17 +01:00
vstring_fwd.h Update copyright years. 2023-01-16 11:52:17 +01:00
vstring_util.h Update copyright years. 2023-01-16 11:52:17 +01:00