From owner-cvs-src@FreeBSD.ORG Thu May 1 05:14:58 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 144B637B401; Thu, 1 May 2003 05:14:58 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id C864243F3F; Thu, 1 May 2003 05:14:55 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3p2/8.8.7) with ESMTP id WAA32336; Thu, 1 May 2003 22:14:52 +1000 Date: Thu, 1 May 2003 22:14:51 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Mike Barcroft In-Reply-To: <20030430184351.B31859@espresso.bsdmike.org> Message-ID: <20030501215201.C19237@gamplex.bde.org> References: <200304301223.h3UCNwOW056381@repoman.freebsd.org> <20030430184351.B31859@espresso.bsdmike.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: Mark Murray cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/i386/i386 identcpu.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 May 2003 12:14:58 -0000 On Wed, 30 Apr 2003, Mike Barcroft wrote: > Mark Murray writes: > > markm 2003/04/30 05:23:58 PDT > > > > FreeBSD src repository > > > > Modified files: > > sys/i386/i386 identcpu.c > > Log: > > Warns fixing. Protect against inappropriate linting, and mark > > GCC-specific assemble code as such (in #ifdefs). Fix an easy > > static variable warning while I'm here. > > > > Revision Changes Path > > 1.122 +8 -1 src/sys/i386/i386/identcpu.c > > Is it really useful to #ifdef critical sections of code. This thing > isn't going to compile without asm extentions from the compiler. So > really you just turn compile errors into link error. Not very helpful > IMO. It's only a link error if the functions (interrupt handlers actually) written in asm aren't implemented externally (as they aren't :-). Since the functions can't be written in C, they should be implemented externally if portability is a requirement -- it's not just lint that requires this. This change depends on the functions being bogusly implicitly declared extern although they were already actually static in the __GNUC__ case. If they were declared static to match their implementation in the __GNUC__ case, then both non-gcc compilers would fail before link time. > Also, you added an used #else clause near the top. ^un Also, the associated #if-#endif clause is just wrong. It unprotects against inappropriate linting (namely, linting of misconfigurations with no xxx_CPU defined -- this configuration shouldn't work with lint any more than it does for compilers) and adds some style bugs. Bruce