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

Jason Merrill jason@redhat.com
Fri Nov 13 21:39:25 GMT 2020

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?


More information about the Gcc-patches mailing list