Pthreads: Prototypes missing if -std=c11
Thu Jul 13 17:38:00 GMT 2017
On 7/13/2017 11:36 AM, email@example.com wrote:
>> On 2017-07-12 11:15, firstname.lastname@example.org wrote:
>>> gcc does not recognize some functions from pthread.h if option -std=c11 is used:
>> Exactly, and the same happens with glibc. When you use -std=c*, that means you are declaring strict ISO C, and all extensions are disabled by > default unless explicitly enabled (e.g. with -D_POSIX_C_SOURCE=200112L).
>> If you are not compatible with ISO C, then you should be using
>> -std=gnu* instead.
> Many thanks for the info, Yaakov. Accoring to the manual -std determines the language standard and c11 means ISO C11, the 2011 revision of the ISO C standard. Howevery, I find no restriction on POSIX in ISO/IEC 9899:2011. So why should -std=c11 have an influence on Pthreads? Am I missing something?
The option means explicit standard C without extensions or additions.
POSIX is atop of the C standard and requires specific definition by the
user if it's required.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin