diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2023-05-12 21:36:56 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2023-05-16 09:59:19 +0100 |
commit | ac3a5bbc62949aeb061c01360632b3b8f5fafefa (patch) | |
tree | 79e07080c84be7208a0edd49e7e04c4361a5299f /libstdc++-v3/include/c_global | |
parent | 5baabdb15d0ee24da414f273a5bafd5eca262ede (diff) | |
download | gcc-ac3a5bbc62949aeb061c01360632b3b8f5fafefa.zip gcc-ac3a5bbc62949aeb061c01360632b3b8f5fafefa.tar.gz gcc-ac3a5bbc62949aeb061c01360632b3b8f5fafefa.tar.bz2 |
libstdc++: Stop using TR1 macros in <cctype> and <cfenv>
As with the two commits before this, the _GLIBCXX_USE_C99_CTYPE_TR1 and
_GLIBCXX_USE_C99_FENV_TR1 macros are misleading when they are also used
for <cctype> and <cfenv>, not only for TR1 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 <ctype.h> and <fenv.h> features using -std=c++11
for the checks. Use the new macros defined by those checks in the
C++11-specific parts of <cctype>, <cfenv>, and <fenv.h>.
libstdc++-v3/ChangeLog:
* acinclude.m4 (GLIBCXX_USE_C99): Check for isblank in C++11
mode and define _GLIBCXX_USE_C99_CTYPE. Check for <fenv.h>
functions in C++11 mode and define _GLIBCXX_USE_C99_FENV.
* config.h.in: Regenerate.
* configure: Regenerate.
* include/c_compatibility/fenv.h: Check _GLIBCXX_USE_C99_FENV
instead of _GLIBCXX_USE_C99_FENV_TR1.
* include/c_global/cfenv: Likewise.
* include/c_global/cctype: Check _GLIBCXX_USE_C99_CTYPE instead
of _GLIBCXX_USE_C99_CTYPE_TR1.
Diffstat (limited to 'libstdc++-v3/include/c_global')
-rw-r--r-- | libstdc++-v3/include/c_global/cctype | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/c_global/cfenv | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libstdc++-v3/include/c_global/cctype b/libstdc++-v3/include/c_global/cctype index bd667fb..e6ff120 100644 --- a/libstdc++-v3/include/c_global/cctype +++ b/libstdc++-v3/include/c_global/cctype @@ -78,7 +78,7 @@ namespace std #if __cplusplus >= 201103L -#ifdef _GLIBCXX_USE_C99_CTYPE_TR1 +#ifdef _GLIBCXX_USE_C99_CTYPE #undef isblank @@ -87,7 +87,7 @@ namespace std using ::isblank; } // namespace std -#endif // _GLIBCXX_USE_C99_CTYPE_TR1 +#endif // _GLIBCXX_USE_C99_CTYPE #endif // C++11 diff --git a/libstdc++-v3/include/c_global/cfenv b/libstdc++-v3/include/c_global/cfenv index 6704dc5..3a1d9c4 100644 --- a/libstdc++-v3/include/c_global/cfenv +++ b/libstdc++-v3/include/c_global/cfenv @@ -41,7 +41,7 @@ # include <fenv.h> #endif -#ifdef _GLIBCXX_USE_C99_FENV_TR1 +#ifdef _GLIBCXX_USE_C99_FENV #undef feclearexcept #undef fegetexceptflag @@ -77,7 +77,7 @@ namespace std using ::feupdateenv; } // namespace std -#endif // _GLIBCXX_USE_C99_FENV_TR1 +#endif // _GLIBCXX_USE_C99_FENV #endif // C++11 |