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 <ja...@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). Jakub