This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: lint kills _Noreturn
- From: Hans-Bernhard BrÃker <HBBroeker at t-online dot de>
- To: cygwin at cygwin dot com
- Date: Mon, 30 May 2016 18:51:03 +0200
- 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> <20160530084454 dot GF12694 at calimero dot vinschen dot de>
Am 30.05.2016 um 10:44 schrieb Corinna Vinschen:
Our cdefs.h is taken almost verbatim from FreeBSD, and FreeBSD's
cdefs.h uses the exact same expressions chcking for lint.
That means almost nothing. The BSD guy might have a good,
platform-specific reason to assign a specific meaning to the macro
"lint" that's buried in their history, and doesn't even apply to Cygwin.
And of course like everybody else, they could simply have got it wrong.
> Don't set lint.
It's not that simple.
On the one hand the global name "lint" is clearly in the user's name
space. If an implementation wants to use a macro that means something
special, and which user code is not supposed to meddle with, that's what
the language has reserved name space patterns for (it should then be
__lint or __LINT).
OTOH the original lint, although it's a tool that's used to check for
violations of such rules among others, unfortunately used to violate
those same rules by predefining a global macro "lint", and existing code
still relies on that property to hide non-standard constructs like that
_Noreturn from lint.
Disappointingly the more modern implementations of lint still get this
wrong, or at least not quite right, in different ways: splint documents
"S_SPLINT_S", which at least looks like a macro, but is still in user
namespace. Gimpel's ones have "_lint", which is better than "lint", but
should really be "__lint".
--
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