This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: What does it mean to include pthread.h with -std=c11?


On Fri, 20 Dec 2019, Florian Weimer wrote:

> * Carlos O'Donell:
> 
> > I'm on the fence here because it _used_ to work, and so it seems like at
> > some point we might have gone from (1) -> (2) without a deeper discussion
> > about exactly what kind of behaviour and maintenance responsibility we want
> > for these headers.
> >
> > Thoughts?
> 
> We have a test for this, see scripts/check-installed-headers.sh.  It
> just fails to catch cases such as this because it cannot test that all
> the defined macros can be expanded.
> 
> I think there are no two sides here.  #include <pthread.h> must work
> in ISO C mode.  Everything else is just very wrong.

Yes.  There may be open questions about which exactly APIs should or 
should not be declared by <pthread.h> in ISO C mode, but it must be a 
self-consistent API set (so no macro depending on other definitions that 
are missing, for example).

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]