lint kills _Noreturn

Corinna Vinschen corinna-cygwin@cygwin.com
Mon May 30 10:35:00 GMT 2016


On May 29 13:21, 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);
> > > 
> > > 
> > > Ken
> > 
> > A traditional lint program may not support the new C11 keywords, but
> > will define the 'lint' symbol. See, e.g.
> >      http://www.unix.com/man-page/FreeBSD/1/lint
> 
> But in the present context (see my second message), we're redefining C11
> keywords even though __STDC_VERSION__ >= 201112L.
> 
> > 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.

Our cdefs.h is taken almost verbatim from FreeBSD, and FreeBSD's
cdefs.h uses the exact same expressions chcking for lint.  I'm sure
you'd see the same problems there.  Don't set lint.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20160530/e138c910/attachment.sig>


More information about the Cygwin mailing list