libstdc++/3561: declaration of '__fmt' shadows previous local in ostream.tcc:490

Phil Edwards
Fri Jul 6 12:15:00 GMT 2001

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.


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

More information about the Gcc-bugs mailing list