From: Jeff Law <law@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>,
Jason Merrill <jason@redhat.com>,
Jonathan Wakely <jwakely@redhat.com>,
John David Anglin <dave.anglin@bell.net>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] c++: Predefine __STDCPP_THREADS__ in the compiler if thread model is not single
Date: Fri, 13 Nov 2020 11:20:42 -0700 [thread overview]
Message-ID: <b0c13476-4c8b-f7ae-dac4-7f80b6aed4f2@redhat.com> (raw)
In-Reply-To: <20201113172945.GH3788@tucnak>
On 11/13/20 10:29 AM, Jakub Jelinek via Gcc-patches wrote:
> Hi!
>
> The following patch predefines __STDCPP_THREADS__ macro to 1 if c++11 or
> later and thread model (e.g. printed by gcc -v) is not single.
> There are two targets not handled by this patch, those that define
> THREAD_MODEL_SPEC. In one case - QNX - it looks just like a mistake
> to me, instead of setting thread_model=posix in config.gcc it uses
> THREAD_MODEL_SPEC macro to set it unconditionally to posix.
> The other is hpux10, which uses -threads option to decide if threads
> are enabled or not, but that option isn't really passed to the compiler.
> I think that is something that really should be solved in config/pa/
> instead, e.g. in the config/xxx/xxx-c.c targets usually set their own
> predefined macros and it could handle this, and either pass the option
> also to the compiler, or say predefine __STDCPP_THREADS__ if _DCE_THREADS
> macro is defined already (or -D_DCE_THREADS found on the command line),
> or whatever else.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> 2020-11-13 Jakub Jelinek <jakub@redhat.com>
>
> * c-cppbuiltin.c: Include configargs.h.
> (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
> defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
> "single".
OK. Note that hpux10 should be considered long dead. I wouldn't let
that get in the way of anything. One could argue we should remove
hpux10 and earlier, leaving just hpux11.
Jeff
next prev parent reply other threads:[~2020-11-13 18:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-13 17:29 Jakub Jelinek
2020-11-13 18:20 ` Jeff Law [this message]
2020-11-13 19:03 ` John David Anglin
2020-11-13 19:05 ` Jeff Law
2020-11-13 19:20 ` Tom Tromey
2020-11-13 21:39 ` Jason Merrill
2020-11-13 21:46 ` Jakub Jelinek
2020-11-13 21:50 ` Jason Merrill
2020-11-13 22:52 ` Jonathan Wakely
2020-11-16 16:23 ` Tom Tromey
2020-11-16 16:49 ` Jonathan Wakely
2020-11-13 21:42 ` Jonathan Wakely
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=b0c13476-4c8b-f7ae-dac4-7f80b6aed4f2@redhat.com \
--to=law@redhat.com \
--cc=dave.anglin@bell.net \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=jason@redhat.com \
--cc=jwakely@redhat.com \
/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).