X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=yfjh+u+mmJFEagcs 1ioUH/tnfHHqLXsiuHR7gMpF4h/LSqcg0EnsYB/0+diuZYgMJvuqL5aIcSZkyj8E g+Z8WM8OGyTs4BhX9miVw6aCIXoaGoaxmy1v6Pry+puIk2Kh81g0WiKhfimSVFxn oNf9M3RCydd7tONu6kvIds6SyVQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=4aaMLOhQNne7Jw8vJruMdL Wv0Fs=; b=TkwUGuMJcB80magh96W4/f2nZg+Sj4qVjgSflDBZDsNwSIU6NfN0lY H71muoQuC6BpTctA/4QQB+019sTy4ifxuVp352h5u97d58RtJCdB4s+aKy5umWSe Qo4jc/L0gI/BK3C+B5cSztnjTDLEC0wFHlJVdrmqGksRaikQrQSQY= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=disturbing, feed, H*Ad:D*ca, conformance X-HELO: smtp-out-so.shaw.ca Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca Subject: Re: Weird mismatch between cdefs and stdatomic To: cygwin AT cygwin DOT com References: <41073a89-b446-8051-faab-badef20bddfc AT gmail DOT com> <3da40be0-c91a-27c3-ac41-8195e63e5e9c AT gmail DOT com> From: Brian Inglis Openpgp: preference=signencrypt Message-ID: Date: Wed, 30 Jan 2019 01:00:26 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <3da40be0-c91a-27c3-ac41-8195e63e5e9c@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes On 2019-01-30 00:15, LRN wrote: > On 28.01.2019 17:02, LRN wrote: >> This[0] and this[1]. 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 https://sourceforge.net/p/predef/wiki/Standards/ and for idiosyncracies https://sourceforge.net/p/predef/wiki/Compilers/ as of two years ago on the wiki; the downloads are six years old; for Windows see https://docs.microsoft.com/en-us/cpp/visual-cpp-language-conformance as MS VC slowly moves towards C99 and C11 support for C++11 and C++14 conformance; details below https://social.msdn.microsoft.com/search/en-US/feed?query=conformance&rn=Visual%20C%2b%2b%20Team%20Blog&rq=site%3ahttps%3a%2f%2fblogs.msdn.microsoft.com%2fvcblog&format=RSS -- 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 FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple