From owner-freebsd-bugs Mon Aug 13 20:50: 7 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 8CF6E37B401 for ; Mon, 13 Aug 2001 20:50:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f7E3o2h41647; Mon, 13 Aug 2001 20:50:02 -0700 (PDT) (envelope-from gnats) Date: Mon, 13 Aug 2001 20:50:02 -0700 (PDT) Message-Id: <200108140350.f7E3o2h41647@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Bruce Evans Subject: Re: bin/29675: lint fails on stdio.h Reply-To: Bruce Evans Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/29675; it has been noted by GNATS. From: Bruce Evans To: Walter Campbell Cc: 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