This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: lint kills _Noreturn
- From: Ken Brown <kbrown at cornell dot edu>
- To: cygwin at cygwin dot com
- Date: Sun, 29 May 2016 11:19:32 -0400
- Subject: Re: lint kills _Noreturn
- Authentication-results: sourceware.org; auth=none
- References: <6fef0097-c076-2691-c4f9-2af5a050a17e at cornell dot edu>
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