public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Tom Tromey <tom@tromey.com>,
	Jakub Jelinek via Gcc-patches <gcc-patches@gcc.gnu.org>,
	Jonathan Wakely <jwakely@redhat.com>,
	John David Anglin <dave.anglin@bell.net>
Subject: Re: [PATCH] c++: Predefine __STDCPP_THREADS__ in the compiler if thread model is not single
Date: Fri, 13 Nov 2020 16:50:57 -0500	[thread overview]
Message-ID: <f21f58b0-a1d7-1169-7e6d-098e754326bb@redhat.com> (raw)
In-Reply-To: <20201113214659.GL3788@tucnak>

On 11/13/20 4:46 PM, Jakub Jelinek wrote:
> On Fri, Nov 13, 2020 at 04:39:25PM -0500, Jason Merrill wrote:
>> On 11/13/20 2:20 PM, Tom Tromey wrote:
>>>>>>>> "Jakub" == Jakub Jelinek via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
>>>
>>> Jakub> 2020-11-13  Jakub Jelinek  <jakub@redhat.com>
>>>
>>> Jakub> 	* c-cppbuiltin.c: Include configargs.h.
>>> Jakub> 	(c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
>>> Jakub> 	defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
>>> Jakub> 	"single".
>>>
>>> Note this is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63287
>>
>> Any opinions about the relative advantage of doing this in the compiler vs.
>> doing it in the library, as in Jonathan's patch in the PR?
> 
> If it is done in the library, it will be defined only if any of the library
> headers are included.
> The https://eel.is/c++draft/cpp.predefined wording doesn't look like it
> would allow defining it only if certain headers are included
> (unlike e.g. the __cpp_lib_* macros which have associated list of headers
> that should define those).

Then the patch is OK.

Jason


  reply	other threads:[~2020-11-13 21:51 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
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 [this message]
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=f21f58b0-a1d7-1169-7e6d-098e754326bb@redhat.com \
    --to=jason@redhat.com \
    --cc=dave.anglin@bell.net \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=jwakely@redhat.com \
    --cc=tom@tromey.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).