From mboxrd@z Thu Jan 1 00:00:00 1970 From: Phil Edwards To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org Subject: Re: libstdc++/3561: declaration of '__fmt' shadows previous local in ostream.tcc:490 Date: Fri, 06 Jul 2001 12:16:00 -0000 Message-id: <20010706191602.29211.qmail@sourceware.cygnus.com> X-SW-Source: 2001-07/msg00170.html List-Id: The following reply was made to PR libstdc++/3561; it has been noted by GNATS. From: Phil Edwards To: Mathieu Olivier 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 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