cvs commit: src/bin/ed Makefile re.c

Bruce Evans bde at zeta.org.au
Sun Jul 20 22:34:13 PDT 2003


On Sun, 20 Jul 2003, Dag-Erling [iso-8859-1] Sm=F8rgrav wrote:

> Ruslan Ermilov <ru at 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


More information about the cvs-src mailing list