From owner-cvs-all Mon Oct 21 18:54:34 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CB39937B401; Mon, 21 Oct 2002 18:54:32 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B7A143E4A; Mon, 21 Oct 2002 18:54:31 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id LAA29200; Tue, 22 Oct 2002 11:54:28 +1000 Date: Tue, 22 Oct 2002 12:05:24 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Juli Mallett Cc: Poul-Henning Kamp , , Subject: Re: cvs commit: src/sys/i386/isa npx.c In-Reply-To: <20021021120627.A81874@FreeBSD.org> Message-ID: <20021022115318.I12946-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 21 Oct 2002, Juli Mallett wrote: > * De: Poul-Henning Kamp [ Data: 2002-10-20 ] > [ Subjecte: Re: cvs commit: src/sys/i386/isa npx.c ] > > In message <20021021110058.Y8562-100000@gamplex.bde.org>, Bruce Evans writes: > > >On Sun, 20 Oct 2002, Poul-Henning Kamp wrote: > > > > > >> phk 2002/10/20 10:30:30 PDT > > >> > > >> Modified files: > > >> sys/i386/isa npx.c > > >> Log: > > >> Hide inline assembly if lint is defined. > > >> > > >> Revision Changes Path > > >> 1.133 +1 -1 src/sys/i386/isa/npx.c > > > > > >Inline assembly was already correctly hidden by a __GNUC__ ifdef. It > > >is a feature that broken lints which define __GNUC__ without actually > > >being supporting all features of gcc barf on unsupported features. > > >Please back this out. > > > > Our kernel is too __GNUC__ infected to making linting it without > > defining __GNUC__ an option. > > > > At the present time, no other compiler stands a chance at compiling > > our kernel, and it therefore seems far more productive to be able > > to run lint on the code we have and use, than the code we don't have > > and don't use. That is true, but this change moves us further from being __GNUC__-clean. The bugs are in the headers, not in npx.c. FreeBSD's lint actually handles npx.c almost perfectly, but that is because some headers have already been broken by adding lint ifdefs. My headers are missing this breakage or have it in a different form for long long, so I had to break them to test this. > This breaks linters which look at __asm__ to find assignment/initialisation > and could result in spurious "used before initialisation" messages and > the like. It shouldn't. The code in the asms should be externed in the !__GNUC__ case, and any variables that are made unused or misinitialized by this are bugs (the variables should probably be externed too). FreeBSD's lint actually has some support for __asm, but since it doesn't really support gcc or define __GNUC__ even when invoked with -g, this support should be unreachable since asms should be in __GNUC__ (not lint!) ifdefs. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message