Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Aug 2001 20:50:02 -0700 (PDT)
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/29675: lint fails on stdio.h
Message-ID:  <200108140350.f7E3o2h41647@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/29675; it has been noted by GNATS.

From: Bruce Evans <bde@zeta.org.au>
To: Walter Campbell <wcampbel@botbay.net>
Cc: <FreeBSD-gnats-submit@FreeBSD.ORG>
Subject: Re: bin/29675: lint fails on stdio.h
Date: Tue, 14 Aug 2001 12:41:37 +1000 (EST)

 On Mon, 13 Aug 2001, Walter Campbell wrote:
 
 > On Tue, 14 Aug 2001, Bruce Evans wrote:
 >
 > > On Mon, 13 Aug 2001, Walter Campbell wrote:
 > > > wcampbel@botbay (alis-2.2beta2.patched): lint -aacgprxhH *.c
 > > > alis.c:
 > > > stdio.h:299: syntax error
 > > > ...
 > > > This happens with make lint on ircd-hybrid 6.2rc1
 > > > ...
 > >
 > > What version of lint is in that?  I think thre is no problem here with
 > > FreeBSD lint, but stdio.h is certainly broken for most foreign versions
 > > of lint, compilers other than gcc, and old version of gcc.  The
 > > hard-coded __attribute__(()) in it needs to be ifdef'ed, not quite as
 > > in the following patch.
 >
 > I'm using the stock FreeBSD lint.  It does give me the syntax error,
 > which causes all my lint's to fail.
 
 I see.  I tested under -current and FreeBSD lint doesn't give the
 syntax error there.  This is a bug in -current.  FreeBSD lint now uses
 "/usr/bin/cc -E x c -D__attribute__(x)= ..." for the preprocessor
 instead of the correct /usr/bin/cpp (in it 4.3 uses /usr/libexec/cpp
 which is correct there).  Using cc instead of cpp results in __GNUC__
 and possibly other wrong things being defined.  This would break all
 programs that carefully use "#ifdef __GNUC ...", except some of the
 breakage is worked around by defining away __attribute__(x).  But
 defining away __attribute__(x) mainly breaks lint's detection of use
 of this unportable feature.
 
 Bruce
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108140350.f7E3o2h41647>