This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/3561: declaration of '__fmt' shadows previous local in ostream.tcc:490
- To: Mathieu Olivier <molivier at microids dot com>
- Subject: Re: libstdc++/3561: declaration of '__fmt' shadows previous local in ostream.tcc:490
- From: Phil Edwards <pedwards at disaster dot jaj dot com>
- Date: Fri, 6 Jul 2001 15:16:23 -0400
- Cc: gcc-gnats at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org
- References: <3B4599C1.8010504@microids.com>
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