Re: src/bin/ed/re.c: warning: declaration of `exp' shadows a global declaration

From: David O'Brien <obrien_at_FreeBSD.ORG>
Date: Mon, 21 Jul 2003 10:13:05 -0700
On Tue, Jul 15, 2003 at 07:59:43AM +0200, Harti Brandt wrote:
> On Tue, 15 Jul 2003, Jun Kuriyama wrote:
> JK>With new gcc and -Wshadow, src/bin/ed/re.c shows this warning:
> JK>
> JK>cc -Wshadow -c re.c
> JK>re.c: In function `get_compiled_pattern':
> JK>re.c:44: warning: declaration of `exp' shadows a global declaration
> JK><built-in>:0: warning: shadowed declaration is here
> JK>
> JK>It seems local variable exp is conflicted with exp(3) declaration.  I
> JK>don't know what name should be used...
> 
> I would call this a compiler bug. It shouldn't declare exp(3) when you
> don't include math.h. As I understand the standard the names in math.h are
> only reserved when you include math.h. I remember that an earlier version
> of gcc had this bug, that was fixed then. Probably they unfixed it again.
> 
> What's the chance of getting this fixed?

There is a discussion on the gcc-patches_at_gcc.gnu.org mailing list, but
they are having a hard time agreeing there is a bug here.  FreeBSD's GCC
problems have a better chance of getting fixed if those that experience
and understand the bug would participate in related discussions on the
GCC mailing lists.  The Linux and Solaris community has no problem doing
this -- for some reason the BSD communities expects the poor guy doing
the GCC imports to be the single voice for BSD. :-(

-- 
-- David    (obrien_at_FreeBSD.org)
Received on Mon Jul 21 2003 - 08:13:05 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:16 UTC