lint kills _Noreturn
Ken Brown
kbrown@cornell.edu
Sun May 29 19:09:00 GMT 2016
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
More information about the Cygwin
mailing list