delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/05/29/11:19:51

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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=MaKgx+F9hEDk291a
Ccl9rb33HS7UtEbslLVS4OBmeGB5ZW6irPUrtmTxfOLkd/rOisxdNJ4XvyRTnPIG
H1Aopfdof8WYGeV5ywismFSoBVaJ0yRle5zA7LOaxjF3HK+YUwt8DhnuNB92A5vy
61yNBKNHxNSxaVgyJxo3BfCd548=
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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=K/ByYW56kIvRJivEmAeiMb
LfDZE=; b=EiYLSdqFplr2ZCksPk8X+jzhYUDWgdbSQAgXNhNkCF81wAChHFE8y+
9weT3s9SfXUc4lJGItU5FuYa/oi0a5BRHgIoJTFUHdhzbreSCbqWM5nF1Z54gZcL
0PPGi3X4sp33+0WP6FqUmAzCpZjZfrVBS0Qde+R5SyfZ8sZi/tXRs=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=20160421, 2016-04-21, H*MI:sk:6fef009, H*f:sk:6fef009
X-HELO: limerock03.mail.cornell.edu
X-CornellRouted: This message has been Routed already.
Subject: Re: lint kills _Noreturn
To: cygwin AT cygwin DOT com
References: <6fef0097-c076-2691-c4f9-2af5a050a17e AT cornell DOT edu>
From: Ken Brown <kbrown AT cornell DOT edu>
Message-ID: <cf76b629-b04c-5e3f-2a68-a1681d8730f9@cornell.edu>
Date: Sun, 29 May 2016 11:19:32 -0400
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0
MIME-Version: 1.0
In-Reply-To: <6fef0097-c076-2691-c4f9-2af5a050a17e@cornell.edu>
X-PMX-Cornell-Gauge: Gauge=XXXXX
X-IsSubscribed: yes

On 5/29/2016 9:42 AM, Ken Brown wrote:
> If lint is defined, then /usr/include/sys/cdefs.h defines _Noreturn as a
> macro that expands to nothing.  Is this intentional?
> 
> Simple test case:
> 
> $ cat test.h
> #define lint 1
> #include <sys/cdefs.h>
> _Noreturn void foo (void);
> 
> $ gcc -E test.h | grep foo
>          void foo (void);

I would think the following is the right thing here:

--- cdefs.h~    2016-04-21 16:14:57.000000000 -0400
+++ cdefs.h     2016-05-29 11:12:09.326695700 -0400
@@ -277,7 +277,7 @@
  * Keywords added in C11.
  */

-#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L || defined(lint)
+#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L

 #if !__has_extension(c_alignas)
 #if (defined(__cplusplus) && __cplusplus >= 201103L) || \

I don't see why defining lint should cause C11 keywords to be redefined, but maybe I'm missing something.

Ken

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019