This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

g++ 4.3.0 error: changes meaning

I'm testing our C++ code with
g++ (GCC) 4.3.0 20070919 (experimental)
That's SVN revision 128608, gcc_trunk.
I'm getting many errors like this:

% g++ -c changes_meaning.cpp
changes_meaning.cpp:8: error: declaration of 'typedef struct ns::foo<double> ns::bar::foo'
changes_meaning.cpp:4: error: changes meaning of 'foo' from 'struct ns::foo<double>'

A minimal reproducer is below.

Compilation works with *many* other compilers incl. all older, released g++, Visual C++, and EDG-based compilers.
Also, if I make this change it works with g++ 4.3.0:

< typedef foo<double> foo;

> typedef ns::foo<double> foo;

I spent some time with Google and also looked here:
But I couldn't find an indication that the new error is intentional.
Is it?


namespace ns {

template <typename T>
struct foo {};

struct bar
  typedef foo<double> foo;


Don't let your dream ride pass you by. Make it a reality with Yahoo! Autos.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]