Date: Thu, 31 Jul 2003 15:50:15 -0700 (PDT) From: Steve Roome <stephen_roome@pepcross.com> To: freebsd-bugs@FreeBSD.org Subject: Re: i386/41930: declaration clash for ffs() and ${CXX} Message-ID: <200307312250.h6VMoFM0023126@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR i386/41930; it has been noted by GNATS. From: Steve Roome <stephen_roome@pepcross.com> To: freebsd-gnats-submit@FreeBSD.org, corecode@corecode.ath.cx Cc: Subject: Re: i386/41930: declaration clash for ffs() and ${CXX} Date: Thu, 31 Jul 2003 23:48:08 +0100 Just noticed that on 4.8-STABLE I get a similar effect compiling code with -ansi. Which is similar, possibly slightly different, but adds weight for the argument for fixing the ffs() code. - Example Code --------------------------------------------------------- #include <string.h> #include <machine/console.h> #include <vgl.h> int main() { return 1; } - Example Compiler Output ---------------------------------------------- gcc -ansi -Wall -Werror test.c cc1: warnings being treated as errors In file included from /usr/include/vgl.h:37, from test.c:3: /usr/include/machine/cpufunc.h:118: warning: static declaration for `ffs' follows non-static - End Example ---------------------------------------------------------- This "implementation detail" might be used by a programmer using C++ or -ansi on a C program, surely it should work ? [ The code quality rant is left as an exersize for the reader! ] Steve Roome
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200307312250.h6VMoFM0023126>