[Bug c++/34094] [4.2/4.3 Regression] Undefined static data member in anonymous namespace can acquire a definition anyway
crowl at google dot com
gcc-bugzilla@gcc.gnu.org
Tue Dec 18 23:47:00 GMT 2007
------- Comment #12 from crowl at google dot com 2007-12-18 23:46 -------
I think the last fix is incomplete:
namespace {
struct simple { static const int size = 4; };
template< typename T >
struct generic { static const int size = 4; };
}
struct instantiate {
simple simple_var;
generic< int > generic_var;
};
member.cc:4: error: static data member '<unnamed>::generic<int>::size' used,
but not defined
Note that the simple class is correct, but the template instance is not.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34094
More information about the Gcc-bugs
mailing list