Date: Mon, 21 Jul 2003 15:33:58 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?= <des@des.no> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/bin/ed Makefile re.c Message-ID: <20030721152032.X3132@gamplex.bde.org> In-Reply-To: <xzp65lx9epv.fsf@dwp.des.no> References: <200307201024.h6KAO9tk009943@repoman.freebsd.org> <20030720213903.J595@gamplex.bde.org> <20030720120438.GD47250@sunbay.com> <xzp65lx9epv.fsf@dwp.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 20 Jul 2003, Dag-Erling [iso-8859-1] Sm=F8rgrav wrote: > Ruslan Ermilov <ru@FreeBSD.org> writes: > > On Sun, Jul 20, 2003 at 09:57:26PM +1000, Bruce Evans wrote: > > > The bug is in gcc-3.3, so it shouldn't be fixed here. > > Why is this a bug in gcc? Compiling re.c,v 1.19 like this works: > > > > make WARNS=3D6 re.o DEBUG_FLAGS=3D-fno-builtin > > It *is* a bug in GCC; -fno-builtin should be the default, and / or GCC or (non-inclusive) > should learn not to define builtins unless an appropriate prototype is > in scope. It is incorrect for the compiler to reserve names like sin, > log or exp in compilation units that don't #include <math.h>. Not quite. These names, like all names of existing or future identifiers with external linkage, are reserved for their normal (external linkage) purposes, so it would be OK for the compiler to warn about global and file-scope-static variables in the program with these names. It is just incorrect to warn about using these names in local variables when there cannot be any global declarations with the same name in scope except via undocumented namespace pollution (from compiler builtins in this case). Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030721152032.X3132>