diff options
author | Olivier Hainque <hainque@adacore.com> | 2021-12-11 08:46:08 +0000 |
---|---|---|
committer | Olivier Hainque <hainque@adacore.com> | 2021-12-13 13:54:11 +0000 |
commit | b80e6d97a9e2425f2a8b97a436335e0abf9105db (patch) | |
tree | 7bc5599c89a7b799ca97a4c005f7788c37ab54a1 /gcc/config/vxworks.h | |
parent | f3f923e51391d279adace7ae24260d87e94b1108 (diff) | |
download | gcc-b80e6d97a9e2425f2a8b97a436335e0abf9105db.zip gcc-b80e6d97a9e2425f2a8b97a436335e0abf9105db.tar.gz gcc-b80e6d97a9e2425f2a8b97a436335e0abf9105db.tar.bz2 |
Ensure VxWorks headers expose C99 features for C++
C++ relies on C99 features since C++11 and libstdc++ down to c++98
checks for C99 features at configure time. Simpler is to request C99
features from system headers unconditionally.
2021-12-11 Olivier Hainque <hainque@adacore.com>
* config/vxworks.h (VXWORKS_OS_CPP_BUILTINS): Define
_C99 for C++.
Diffstat (limited to 'gcc/config/vxworks.h')
-rw-r--r-- | gcc/config/vxworks.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/config/vxworks.h b/gcc/config/vxworks.h index a89e3d6..f76141f 100644 --- a/gcc/config/vxworks.h +++ b/gcc/config/vxworks.h @@ -286,6 +286,12 @@ extern void vxworks_asm_out_destructor (rtx symbol, int priority); if (!flag_isoc99 && !c_dialect_cxx()) \ builtin_define ("_ALLOW_KEYWORD_MACROS"); \ } \ + /* C++ support relies on C99 features from C++11, even C++98 \ + for listdc++ in particular, with corresponding checks at \ + configure time. Make sure C99 features are exposed by the \ + system headers. */ \ + if (c_dialect_cxx()) \ + builtin_define("_C99"); \ } \ while (0) |