public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/63287] __STDCPP_THREADS__ is not defined
Date: Fri, 13 Nov 2020 22:26:15 +0000	[thread overview]
Message-ID: <bug-63287-4-dd6GXJgf0m@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-63287-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63287

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:1d9a8675d379f02f5e39639f469ae8dfcf33fea9

commit r11-5017-g1d9a8675d379f02f5e39639f469ae8dfcf33fea9
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Nov 13 23:23:33 2020 +0100

    c++: Predefine __STDCPP_THREADS__ in the compiler if thread model is not
single [PR63287]

    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.

    2020-11-13  Jakub Jelinek  <jakub@redhat.com>

            PR c++/63287
            * 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".

      parent reply	other threads:[~2020-11-13 22:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-17 15:49 [Bug c++/63287] New: " redi at gcc dot gnu.org
2014-09-17 15:50 ` [Bug c++/63287] " redi at gcc dot gnu.org
2015-01-17 20:44 ` redi at gcc dot gnu.org
2020-11-12 18:19 ` redi at gcc dot gnu.org
2020-11-12 19:03 ` redi at gcc dot gnu.org
2020-11-13 12:36 ` redi at gcc dot gnu.org
2020-11-13 22:26 ` cvs-commit at gcc dot gnu.org [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=bug-63287-4-dd6GXJgf0m@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).