Re: Weird mismatch between cdefs and stdatomic
On 2019-01-30 00:15, LRN wrote:
> On 28.01.2019 17:02, LRN wrote:
>> This and this. One header checks for atomic C/CXX extensions *and* for
>> the presence of a C++ compiler, while the other only checks for extensions.
>> The result is that the _Atomic() macro is *not* defined in cdefs.h when
>> compiled with C++, but the stdatomic.h atomic macros assume that it is, and try
>> to access the "__val" struct member, with predictable and sad results.
>> I just stumbled upon this while compiling OpenSSL, and wanted to see if anyone
>> else encountered this problem.
> There is also a "!defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L"
> condition in cdefs.h that is not reproduced in stdatomic.h. So my initial guess
> seems to have been incorrect - it's not about C vs C++ compiler, it's about C11
> vs C99 compiler modes.
Search or man feature_test_macros or look at
and for idiosyncracies
as of two years ago on the wiki; the downloads are six years old; for Windows see
as MS VC slowly moves towards C99 and C11 support for C++11 and C++14
conformance; details below
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple