public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5929] Ensure VxWorks headers expose C99 features for C++
@ 2021-12-13 13:54 Olivier Hainque
  0 siblings, 0 replies; only message in thread
From: Olivier Hainque @ 2021-12-13 13:54 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:b80e6d97a9e2425f2a8b97a436335e0abf9105db

commit r12-5929-gb80e6d97a9e2425f2a8b97a436335e0abf9105db
Author: Olivier Hainque <hainque@adacore.com>
Date:   Sat Dec 11 08:46:08 2021 +0000

    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++.

Diff:
---
 gcc/config/vxworks.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gcc/config/vxworks.h b/gcc/config/vxworks.h
index a89e3d68c62..f76141ffdca 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)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-13 13:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-13 13:54 [gcc r12-5929] Ensure VxWorks headers expose C99 features for C++ Olivier Hainque

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).