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

--- Comment #22 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> ---
(In reply to Florian Weimer from comment #21)
> (In reply to Jakub Jelinek from comment #20)
> > It is not that easy.  __STDC_NO_THREADS__ is a predefined macro, so it would
> > mean (at least on targets without stdc-predef.h, with that header one would
> > hope that the library describes its implementation correctly) the compiler
> > would need on every single compilation try to internally #if
> > !__has_include(<threads.h>) #define __STDC_NO_THREADS__ #endif or so.
> 
> I think this would have to be configured at compiler build time.

Does this mean that it is not possible to have several C libraries on a system?

> Otherwise the macro gets defined if an -I directory happens to contain
> a file called threads.h.

I suppose that you meant that the macro will *not* be defined by GCC if an -I
directory happens to contain a file called threads.h.

But having such a directory (with files with the same name as a standard
header), isn't this undefined behavior?

Reply via email to