Date: Thu, 1 May 2003 22:14:51 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: Mike Barcroft <mike@FreeBSD.org> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/i386/i386 identcpu.c Message-ID: <20030501215201.C19237@gamplex.bde.org> In-Reply-To: <20030430184351.B31859@espresso.bsdmike.org> References: <200304301223.h3UCNwOW056381@repoman.freebsd.org> <20030430184351.B31859@espresso.bsdmike.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 30 Apr 2003, Mike Barcroft wrote: > Mark Murray <markm@FreeBSD.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030501215201.C19237>