lint kills _Noreturn

Andy Moreton andrewjmoreton@gmail.com
Sun May 29 19:28:00 GMT 2016


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

Surely the real problem here is a program which is not a lint executable
defining 'lint' ?

    AndyM


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