This is the mail archive of the
libstdc++@sources.redhat.com
mailing list for the libstdc++ project.
Re: another small thing
- To: STDC++ <libstdc++ at sources dot redhat dot com>
- Subject: Re: another small thing
- From: Levente Farkas <lfarkas at mindmaker dot hu>
- Date: Wed, 16 Aug 2000 14:31:17 +0200
- Organization: Mindmaker Ltd.
- References: <Pine.SOL.3.91.1000814123528.5974A-100000@cse.cygnus.com>
- Reply-To: lfarkas at mindmaker dot hu
-------------------
#include <cmath>
#include <string>
int main()
{
std::string s("xxx");
return 0;
}
-------------------
g++ -Wshadow test.cpp
is give the error for me (ok if I miss the -Wshadow...:_)
Benjamin Kosnik wrote:
>
> can't reproduce this with this simple test case
>
> #include <cmath>
> #include <string>
>
> int main()
> {
> using namespace std;
>
> string test("miles, kind of blue");
> return 0;
> }
>
> Perhaps you could provide more detail?
>
> -benjamin
>
> > `std::basic_string<_CharT, _Traits, _Alloc>::basic_string (const _CharT *, const
> > _Alloc &) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc =
> > std::allocator<char>]'
> > /usr/include/g++-v3/bits/locale_facets.h:1311: instantiated from here
> > /usr/include/g++-v3/bits/basic_string.h:301: warning: declaration of `__j1'
> > shadows global declaration
> > -------------------------
> > what is the global __j1 anyway ? it's come from math.h with friends:
> > j0 j1 jn y0 y1 yn
> > the soulution would be to not include cmath before string, but:-((
--
-- Levente
"The only thing worse than not knowing the truth is
ruining the bliss of ignorance."