public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Olivier Hainque <hainque@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-5929] Ensure VxWorks headers expose C99 features for C++
Date: Mon, 13 Dec 2021 13:54:34 +0000 (GMT)	[thread overview]
Message-ID: <20211213135434.032B0385781A@sourceware.org> (raw)

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)


                 reply	other threads:[~2021-12-13 13:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211213135434.032B0385781A@sourceware.org \
    --to=hainque@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).