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

Harti Brandt brandt at fokus.fraunhofer.de
Wed Jul 23 00:56:06 PDT 2003


On Mon, 21 Jul 2003, David O'Brien wrote:

DO>On Tue, Jul 15, 2003 at 07:59:43AM +0200, Harti Brandt wrote:
DO>> On Tue, 15 Jul 2003, Jun Kuriyama wrote:
DO>> JK>With new gcc and -Wshadow, src/bin/ed/re.c shows this warning:
DO>> JK>
DO>> JK>cc -Wshadow -c re.c
DO>> JK>re.c: In function `get_compiled_pattern':
DO>> JK>re.c:44: warning: declaration of `exp' shadows a global declaration
DO>> JK><built-in>:0: warning: shadowed declaration is here
DO>> JK>
DO>> JK>It seems local variable exp is conflicted with exp(3) declaration.  I
DO>> JK>don't know what name should be used...
DO>>
DO>> I would call this a compiler bug. It shouldn't declare exp(3) when you
DO>> don't include math.h. As I understand the standard the names in math.h are
DO>> only reserved when you include math.h. I remember that an earlier version
DO>> of gcc had this bug, that was fixed then. Probably they unfixed it again.
DO>>
DO>> What's the chance of getting this fixed?
DO>
DO>There is a discussion on the gcc-patches at gcc.gnu.org mailing list, but
DO>they are having a hard time agreeing there is a bug here.  FreeBSD's GCC
DO>problems have a better chance of getting fixed if those that experience
DO>and understand the bug would participate in related discussions on the
DO>GCC mailing lists.  The Linux and Solaris community has no problem doing
DO>this -- for some reason the BSD communities expects the poor guy doing
DO>the GCC imports to be the single voice for BSD. :-(

Well, I have subscribed. I red the messages in this thread and it seems,
that there is more agreement that this needs to be fixed than people
against it. I'm not familiar with the process in the gcc-community. Is
there any action required?

harti
-- 
harti brandt,
http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private
brandt at fokus.fraunhofer.de, harti at freebsd.org


More information about the freebsd-current mailing list