public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
To: Olivier Hainque <hainque@adacore.com>,
	libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Define _C99 in libstdc++ vxworks/os_defines.h
Date: Fri, 10 Dec 2021 16:15:20 +0100	[thread overview]
Message-ID: <3a28a096-3aec-7270-5e7b-9b8a54e4c7b9@prevas.dk> (raw)
In-Reply-To: <FE28FC39-25F4-4C95-A323-CD698C372378@adacore.com>

On 10/12/2021 16.06, Olivier Hainque wrote:
> Hello,
> 
> The attached patch for libstdc++ / VxWorks helps building
> the library for old versions of the OS, as witnessed with
> VxWorks 6.9 in particular.
> 
> It explicitly requests C99 features from old system headers,
> on which libstc++ relies since at least c++98. The specific
> issue that exposed this was a failure to compile
> 
>   libstdc++-v3/src/c++17/floating_to_chars.cc
> 
> for VxWorks 6.9 with a batch of errors such as:
> 
>   error: 'FP_NAN' was not declared in this scope
> 
> The missing definitions are provided by the
> system headers with guards on _HAS_C9X, which gets
> internally defined when _C99 is.
> 
> Ok to commit?

Yes, we've observed that error as well. We have just patched our vxworks
5.5 headers to provide FP_NAN et al. There's no test of definedness or
other uses of a _C99 macro anywhere, so ok by me, as it shouldn't change
anything on our end.

Rasmus

  reply	other threads:[~2021-12-10 15:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-10 15:06 Olivier Hainque
2021-12-10 15:15 ` Rasmus Villemoes [this message]
2021-12-10 15:42   ` Jonathan Wakely
2021-12-10 16:15     ` Olivier Hainque

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=3a28a096-3aec-7270-5e7b-9b8a54e4c7b9@prevas.dk \
    --to=rasmus.villemoes@prevas.dk \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hainque@adacore.com \
    --cc=libstdc++@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).