public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* libstdc++/3561: declaration of '__fmt' shadows previous local in ostream.tcc:490
@ 2001-07-04  8:56 molivier
  0 siblings, 0 replies; 7+ messages in thread
From: molivier @ 2001-07-04  8:56 UTC (permalink / raw)
  To: gcc-gnats

>Number:         3561
>Category:       libstdc++
>Synopsis:       declaration of '__fmt' shadows previous local in ostream.tcc:490
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 04 08:56:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Mathieu Olivier
>Release:        3.0 (Debian) (Debian testing/unstable)
>Organization:
>Environment:
System: Linux antares 2.2.17 #1 Sun Jun 25 09:24:41 EST 2000 i686 unknown
Architecture: i686
host: i386-pc-linux-gnu
build: i386-pc-linux-gnu
target: i386-pc-linux-gnu
configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,objc --prefix=/usr --infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as --with-gnu-ld --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --enable-threads=posix --enable-java-gc=boehm --with-cpp-install-dir=bin --enable-objc-gc i386-linux
>Description:
I compile my program with -Wshadow and g++ said: "/usr/include/g++-v3/bits/ostream.tcc:490: warning: declaration of `__fmt' shadows previous local" which is exact...
>How-To-Repeat:
Just try to use ostream with -Wshadow
>Fix:
Remaming all instances of the second __fmt to __fmt2 should be enough I think
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: libstdc++/3561: declaration of '__fmt' shadows previous local in ostream.tcc:490
@ 2002-01-28 12:57 ljrittle
  0 siblings, 0 replies; 7+ messages in thread
From: ljrittle @ 2002-01-28 12:57 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, molivier, nobody

Synopsis: declaration of '__fmt' shadows previous local in ostream.tcc:490

State-Changed-From-To: open->closed
State-Changed-By: ljrittle
State-Changed-When: Mon Jan 28 12:57:21 2002
State-Changed-Why:
    Problem was fixed on mainline at some point.  Fixed on
    3.0.X branch before 3.0.4 release with:
    
    2002-01-28  Jens Rehsack <rehsack@web.de>
    
    	libstdc++/3561
    	* include/bits/ostream.tcc (__pad_char): Support -Wshadow -Werror.
    
    Here was my final analysis of the PR:
    
    It appears that being marked as code within a system header does not
    affect template instantiation that is actually triggered outside the
    header.  If this issue only arose when one was compiling libstdc++-v3
    (as I first thought), then we could just say, "don't compile
    libstdc++-v3 with both flags" but this issue impacts building user
    code outside the library with strict warning flags.
    
    The problem had nothing to do with prefix configuration.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=3561


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: libstdc++/3561: declaration of '__fmt' shadows previous local in ostream.tcc:490
@ 2001-07-11 13:46 Phil Edwards
  0 siblings, 0 replies; 7+ messages in thread
From: Phil Edwards @ 2001-07-11 13:46 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR libstdc++/3561; it has been noted by GNATS.

From: Phil Edwards <pedwards@disaster.jaj.com>
To: Mathieu Olivier <molivier@microids.com>
Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org
Subject: Re: libstdc++/3561: declaration of '__fmt' shadows previous local in ostream.tcc:490
Date: Wed, 11 Jul 2001 16:37:33 -0400

 On Mon, Jul 09, 2001 at 10:53:03AM +0200, Mathieu Olivier wrote:
 > Phil Edwards wrote:
 > [snip]
 > > Ah.  Figured it out.  I missed this part of your original bug report:
 > > 
 > >     configured with: ../src/configure [...] --prefix=/usr
 > > 
 > > Don't configure with --prefix=/usr unless you're a system vendor setting
 > > up a distribution.  It severely confuses GCC's idea of which headers
 > > are system headers and which headers are yours.  In this case, the C++
 > > library headers (normally "system") are being detected as yours.
 > 
 > The problem is that I haven't configured anything. I just installed 
 > GCC/G++ with Debian packaging tool APT ("apt-get install gcc-3.0 
 > g++-3.0" if I remember well). So maybe it's a problem with Debian then ?
 
 Hmmm.  Good question.  I don't know the answer.  Anyone?
 
 Phil
 
 -- 
 Would I had phrases that are not known, utterances that are strange, in
 new language that has not been used, free from repetition, not an utterance
 which has grown stale, which men of old have spoken.
                                      - anonymous Egyptian scribe, c.1700 BC


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: libstdc++/3561: declaration of '__fmt' shadows previous local in ostream.tcc:490
@ 2001-07-09  1:56 Mathieu Olivier
  0 siblings, 0 replies; 7+ messages in thread
From: Mathieu Olivier @ 2001-07-09  1:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR libstdc++/3561; it has been noted by GNATS.

From: Mathieu Olivier <molivier@microids.com>
To: Phil Edwards <pedwards@disaster.jaj.com>
Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org
Subject: Re: libstdc++/3561: declaration of '__fmt' shadows previous local in ostream.tcc:490
Date: Mon, 09 Jul 2001 10:53:03 +0200

 Phil Edwards wrote:
 [snip]
 
 > 
 > Ah.  Figured it out.  I missed this part of your original bug report:
 > 
 >     configured with: ../src/configure [...] --prefix=/usr
 > 
 > Don't configure with --prefix=/usr unless you're a system vendor setting
 > up a distribution.  It severely confuses GCC's idea of which headers
 > are system headers and which headers are yours.  In this case, the C++
 > library headers (normally "system") are being detected as yours.
 
 
 The problem is that I haven't configured anything. I just installed 
 GCC/G++ with Debian packaging tool APT ("apt-get install gcc-3.0 
 g++-3.0" if I remember well). So maybe it's a problem with Debian then ?
 
 Mathieu Olivier
 
 
 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: libstdc++/3561: declaration of '__fmt' shadows previous local in ostream.tcc:490
@ 2001-07-06 12:16 Phil Edwards
  0 siblings, 0 replies; 7+ messages in thread
From: Phil Edwards @ 2001-07-06 12:16 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR libstdc++/3561; it has been noted by GNATS.

From: Phil Edwards <pedwards@disaster.jaj.com>
To: Mathieu Olivier <molivier@microids.com>
Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org
Subject: Re: libstdc++/3561: declaration of '__fmt' shadows previous local in ostream.tcc:490
Date: Fri, 6 Jul 2001 15:16:23 -0400

 On Fri, Jul 06, 2001 at 12:58:09PM +0200, Mathieu Olivier wrote:
 >  > > >How-To-Repeat:
 >  > > Just try to use ostream with -Wshadow
 >  >
 >  > Nope, doesn't happen. I do see the warning (along with a few others) if
 >  > I use "-Wshadow -Wsystem-headers", but since <ostream> is a system header,
 >  > warnings are suppressed by default. You must specifically request them.
 >  >
 > Really ?  I mean, I even tried with just "-Wshadow -Wno-system-headers" 
 > (no -Wall, or any other -W*) and the warning appears anyhow.  :(
 
 Ah.  Figured it out.  I missed this part of your original bug report:
 
     configured with: ../src/configure [...] --prefix=/usr
 
 Don't configure with --prefix=/usr unless you're a system vendor setting
 up a distribution.  It severely confuses GCC's idea of which headers
 are system headers and which headers are yours.  In this case, the C++
 library headers (normally "system") are being detected as yours.
 
 Phil
 
 -- 
 Would I had phrases that are not known, utterances that are strange, in
 new language that has not been used, free from repetition, not an utterance
 which has grown stale, which men of old have spoken.
                                      - anonymous Egyptian scribe, c.1700 BC


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: libstdc++/3561: declaration of '__fmt' shadows previous local in ostream.tcc:490
@ 2001-07-05 14:36 Phil Edwards
  0 siblings, 0 replies; 7+ messages in thread
From: Phil Edwards @ 2001-07-05 14:36 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR libstdc++/3561; it has been noted by GNATS.

From: Phil Edwards <pedwards@disaster.jaj.com>
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: libstdc++/3561: declaration of '__fmt' shadows previous local in ostream.tcc:490
Date: Thu, 5 Jul 2001 17:32:16 -0400

 On Thu, Jul 05, 2001 at 09:06:00PM -0000, Phil Edwards wrote:
 >  Nope, doesn't happen.  I do see the warning (along with a few others) if
 >  I use "-Wshadow -Wsystem-headers",
 
 Just for the record, compiling 17_intro/headers.cc with those two switches
 yields:
 
 In file included from /home/pme/build/install-2001-07-05/include/g++-v3/bits/locale_facets.h:415,
                  from /home/pme/build/install-2001-07-05/include/g++-v3/bits/basic_ios.h:36,
                  from /home/pme/build/install-2001-07-05/include/g++-v3/bits/std_ios.h:46,
                  from /home/pme/build/install-2001-07-05/include/g++-v3/bits/std_ostream.h:39,
                  from /home/pme/build/install-2001-07-05/include/g++-v3/bits/std_bitset.h:70,
                  from /home/pme/build/install-2001-07-05/include/g++-v3/bitset:31,
                  from headers.cc:26:
 /home/pme/build/install-2001-07-05/include/g++-v3/bits/codecvt.h: In member 
    function `virtual std::codecvt_base::result std::codecvt<_InternT, _ExternT, 
    std::__enc_traits>::do_out(std::__enc_traits&, const _InternT*, const 
    _InternT*, const _InternT*&, _ExternT*, _ExternT*, _ExternT*&) const':
 /home/pme/build/install-2001-07-05/include/g++-v3/bits/codecvt.h:400: warning: declaration
    of `__desc_type' shadows a member of `this'
 /home/pme/build/install-2001-07-05/include/g++-v3/bits/codecvt.h: In member 
    function `virtual std::codecvt_base::result std::codecvt<_InternT, _ExternT, 
    std::__enc_traits>::do_unshift(std::__enc_traits&, _ExternT*, _ExternT*, 
    _ExternT*&) const':
 /home/pme/build/install-2001-07-05/include/g++-v3/bits/codecvt.h:467: warning: declaration
    of `__desc_type' shadows a member of `this'
 /home/pme/build/install-2001-07-05/include/g++-v3/bits/codecvt.h: In member 
    function `virtual std::codecvt_base::result std::codecvt<_InternT, _ExternT, 
    std::__enc_traits>::do_in(std::__enc_traits&, const _ExternT*, const 
    _ExternT*, const _ExternT*&, _InternT*, _InternT*, _InternT*&) const':
 /home/pme/build/install-2001-07-05/include/g++-v3/bits/codecvt.h:505: warning: declaration
    of `__desc_type' shadows a member of `this'
 In file included from /home/pme/build/install-2001-07-05/include/g++-v3/bits/std_ostream.h:278,
                  from /home/pme/build/install-2001-07-05/include/g++-v3/bits/std_bitset.h:70,
                  from /home/pme/build/install-2001-07-05/include/g++-v3/bitset:31,
                  from headers.cc:26:
 /home/pme/build/install-2001-07-05/include/g++-v3/bits/ostream.tcc: In function 
    `void std::__pad_char(std::basic_ios<_CharT, _Traits>&, _CharT*, const 
    _CharT*, int, int)':
 /home/pme/build/install-2001-07-05/include/g++-v3/bits/ostream.tcc:490: warning: declaration
    of `__fmt' shadows previous local
 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: libstdc++/3561: declaration of '__fmt' shadows previous local in ostream.tcc:490
@ 2001-07-05 14:06 Phil Edwards
  0 siblings, 0 replies; 7+ messages in thread
From: Phil Edwards @ 2001-07-05 14:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR libstdc++/3561; it has been noted by GNATS.

From: Phil Edwards <pedwards@disaster.jaj.com>
To: molivier@users.sourceforge.net
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: libstdc++/3561: declaration of '__fmt' shadows previous local in ostream.tcc:490
Date: Thu, 5 Jul 2001 16:57:59 -0400

 On Wed, Jul 04, 2001 at 03:54:56PM -0000, molivier@users.sourceforge.net wrote:
 > >How-To-Repeat:
 > Just try to use ostream with -Wshadow
 
 Nope, doesn't happen.  I do see the warning (along with a few others) if
 I use "-Wshadow -Wsystem-headers", but since <ostream> is a system header,
 warnings are suppressed by default.  You must specifically request them.
 
 Phil
 


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-01-28 20:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-04  8:56 libstdc++/3561: declaration of '__fmt' shadows previous local in ostream.tcc:490 molivier
2001-07-05 14:06 Phil Edwards
2001-07-05 14:36 Phil Edwards
2001-07-06 12:16 Phil Edwards
2001-07-09  1:56 Mathieu Olivier
2001-07-11 13:46 Phil Edwards
2002-01-28 12:57 ljrittle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).