This is the mail archive of the
mailing list for the Cygwin project.
Re: lint kills _Noreturn
- From: Andy Moreton <andrewjmoreton at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Sun, 29 May 2016 20:09:07 +0100
- Subject: Re: lint kills _Noreturn
- Authentication-results: sourceware.org; auth=none
- References: <6fef0097-c076-2691-c4f9-2af5a050a17e at cornell dot edu> <86fut07qha dot fsf at gmail dot com> <9c66686a-0af8-dbfe-7804-797df8aad7c6 at cornell dot edu>
On Sun 29 May 2016, Ken Brown wrote:
> On 5/29/2016 12:56 PM, Andy Moreton wrote:
>> On Sun 29 May 2016, 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);
>> A traditional lint program may not support the new C11 keywords, but
>> will define the 'lint' symbol. See, e.g.
> But in the present context (see my second message), we're redefining C11
> keywords even though __STDC_VERSION__ >= 201112L.
Agreed, but that should only affect a lint program that understands C11.
Any other program should simply not be defining lint in the first place.
>> Surely the real problem here is a program which is not a lint executable
>> defining 'lint' ?
> The program is emacs built from a git checkout of the master branch. By
> default the configure option --enable-gcc-checking is used, and this causes
> lint to be defined in src/config.h. It doesn't seem to be a problem on
> platforms other than Cygwin; or at least it hasn't been reported.
I saw your report of emacs bug#23640, and followed here. I think the
real question is why the recent change to emacs configure.ac added a
definition of lint - that seems wrong.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple