What does it mean to include pthread.h with -std=c11?
Joseph Myers
joseph@codesourcery.com
Fri Dec 20 20:40:00 GMT 2019
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
More information about the Libc-alpha
mailing list