From: Olivier Hainque <hainque@adacore.com>
To: Jonathan Wakely <jwakely.gcc@gmail.com>
Cc: Olivier Hainque <hainque@adacore.com>,
Jonathan Wakely <jwakely@redhat.com>,
libstdc++ <libstdc++@gcc.gnu.org>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] #undef isblank before def or decl in libstdc++ headers
Date: Mon, 13 Dec 2021 12:09:07 +0100 [thread overview]
Message-ID: <23CB6D92-BE23-401F-8B8B-D2959203527D@adacore.com> (raw)
In-Reply-To: <CAH6eHdT2gcZt7meKOrisGxbhXZi1j_5VW=7cPFGEOeUgNy5vZg@mail.gmail.com>
> On 11 Dec 2021, at 18:09, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>
> * config/vxworks.h (VXWORKS_OS_CPP_BUILTINS): Define
> _C99 for C++.
>
> Makes sense?
>
> Yes. I can't approve patches outside libstdc++, but that looks definitely correct for C++11 and later, because C++11 incorporates the whole C99 library by reference. So if that macro is needed to get the C99 library (because the vxworks libc doesn't check the__cplusplus macro and enable C99 features that way), then I agree _C99 should be defined for C++11. Defining it for C++11 is sufficient to solve the isblank problem, because std::isblank is only declared for C++11 and later. (std::tr1::isblank is declared for C++98 if the C library supports it, but nobody really cares about TR1 nowadays, and probably hardly anybody cares about C++98).
>
> Defining _C99 is not strictly correct for C++98 mode, because C++98 incorporates the C89 library by reference. But as you noted in the earlier patch, libstdc++ likes to have full C99 facilities available even for C++98 mode (so it can use them for std::tr1 features, among other things). So I think defining it even for C++98 is fine too.
Testing looks good so far and libstdc++ configure is a lot
happier indeed.
Inspecting the logs spotted an inaccuracy in another area,
which I'll address separately.
Thanks a lot for your feedback!
With Kind Regards,
Olivier
prev parent reply other threads:[~2021-12-13 11:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-10 17:06 Olivier Hainque
2021-12-10 18:24 ` Jonathan Wakely
2021-12-11 10:55 ` Olivier Hainque
2021-12-11 17:09 ` Jonathan Wakely
2021-12-13 11:09 ` Olivier Hainque [this message]
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=23CB6D92-BE23-401F-8B8B-D2959203527D@adacore.com \
--to=hainque@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jwakely.gcc@gmail.com \
--cc=jwakely@redhat.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).