-
- Downloads
libstdc++: Stop using _GLIBCXX_USE_C99_STDINT_TR1 in <cstdint>
The _GLIBCXX_USE_C99_STDINT_TR1 macro (and the comments about it in acinclude.m4 and config.h) are misleading when it is also used for <stdint>, not only <tr1/stdint>. It is also wrong, because the configure checks for TR1 use -std=c++98 and a target might define uint32_t etc. for C++11 but not for C++98. Add a separate configure check for the <stdint.h> types using -std=c++11 for the checks. Use the result of that separate check in <cstdint> and most other places that still depend on the macro (many uses of that macro have been removed already). The remaining uses of the STDINT_TR1 macro are really for TR1, or are in the src/c++11/compatibility-*.cc files, where we don't want/need to change the condition they depend on (if those symbols were only exported when <stdint.h> types were available for -std=c++98, then that's the condition we should continue to use for whether to export the compat symbols now). Make similar changes for the related _GLIBCXX_USE_C99_INTTYPES_TR1 and _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1 macros, adding new macros for non-TR1 uses. libstdc++-v3/ChangeLog: * acinclude.m4 (GLIBCXX_USE_C99): Check for <stdint.h> types in C++11 mode and define _GLIBCXX_USE_C99_STDINT. Check for <inttypes.h> features in C++11 mode and define _GLIBCXX_USE_C99_INTTYPES and _GLIBCXX_USE_C99_INTTYPES_WCHAR_T. * config.h.in: Regenerate. * configure: Regenerate. * doc/doxygen/user.cfg.in (PREDEFINED): Add new macros. * include/bits/chrono.h: Check _GLIBCXX_USE_C99_STDINT instead of _GLIBCXX_USE_C99_STDINT_TR1. * include/c_compatibility/inttypes.h: Check _GLIBCXX_USE_C99_INTTYPES and _GLIBCXX_USE_C99_INTTYPES_WCHAR_T instead of _GLIBCXX_USE_C99_INTTYPES_TR1 and _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1. * include/c_compatibility/stdatomic.h: Check _GLIBCXX_USE_C99_STDINT instead of _GLIBCXX_USE_C99_STDINT_TR1. * include/c_compatibility/stdint.h: Likewise. * include/c_global/cinttypes: Check _GLIBCXX_USE_C99_INTTYPES and _GLIBCXX_USE_C99_INTTYPES_WCHAR_T instead of _GLIBCXX_USE_C99_INTTYPES_TR1 and _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1. * include/c_global/cstdint: Check _GLIBCXX_USE_C99_STDINT instead of _GLIBCXX_USE_C99_STDINT_TR1. * include/std/atomic: Likewise. * src/c++11/cow-stdexcept.cc: Likewise. * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: Likewise. * testsuite/lib/libstdc++.exp (check_v3_target_cstdint): Likewise.
Showing
- libstdc++-v3/acinclude.m4 142 additions, 0 deletionslibstdc++-v3/acinclude.m4
- libstdc++-v3/config.h.in 12 additions, 0 deletionslibstdc++-v3/config.h.in
- libstdc++-v3/configure 196 additions, 0 deletionslibstdc++-v3/configure
- libstdc++-v3/doc/doxygen/user.cfg.in 3 additions, 0 deletionslibstdc++-v3/doc/doxygen/user.cfg.in
- libstdc++-v3/include/bits/chrono.h 1 addition, 1 deletionlibstdc++-v3/include/bits/chrono.h
- libstdc++-v3/include/c_compatibility/inttypes.h 3 additions, 3 deletionslibstdc++-v3/include/c_compatibility/inttypes.h
- libstdc++-v3/include/c_compatibility/stdatomic.h 2 additions, 2 deletionslibstdc++-v3/include/c_compatibility/stdatomic.h
- libstdc++-v3/include/c_compatibility/stdint.h 2 additions, 2 deletionslibstdc++-v3/include/c_compatibility/stdint.h
- libstdc++-v3/include/c_global/cinttypes 3 additions, 3 deletionslibstdc++-v3/include/c_global/cinttypes
- libstdc++-v3/include/c_global/cstdint 3 additions, 3 deletionslibstdc++-v3/include/c_global/cstdint
- libstdc++-v3/include/std/atomic 1 addition, 1 deletionlibstdc++-v3/include/std/atomic
- libstdc++-v3/src/c++11/cow-stdexcept.cc 2 additions, 2 deletionslibstdc++-v3/src/c++11/cow-stdexcept.cc
- libstdc++-v3/testsuite/29_atomics/headers/stdatomic.h/c_compat.cc 1 addition, 1 deletion...+-v3/testsuite/29_atomics/headers/stdatomic.h/c_compat.cc
- libstdc++-v3/testsuite/lib/libstdc++.exp 1 addition, 1 deletionlibstdc++-v3/testsuite/lib/libstdc++.exp
Loading
Please register or sign in to comment