This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: namelookup bug in gcc?
- From: Joe Buck <Joe dot Buck at synopsys dot COM>
- To: Balazs Dezso <deba at inf dot elte dot hu>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 22 Apr 2008 11:32:41 -0700
- Subject: Re: namelookup bug in gcc?
- References: <200804221428.15776.deba@inf.elte.hu>
On Tue, Apr 22, 2008 at 02:28:15PM +0200, Balazs Dezso wrote:
> I have tested the following code on g++ 4.3, 4.2, 4.1 and 3.4.
Looks like a bug. Please file a bug report at http://gcc.gnu.org/bugzilla
> #include <iostream>
>
> struct B {
> static const int x = 1;
> };
>
> struct A {
> static const int x = 0;
> template <typename A>
> static void f() {
> std::cerr << A::x << std::endl;
> }
> };
>
> int main() {
> A::f<B>();
> return 0;
> }
>
> The gcc result:
> 0
> While icc, msvc result:
> 1