This is the mail archive of the gcc-bugs@gcc.gnu.org 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]

[Bug c++/30745] Undefined static const



------- Comment #2 from hans dot buchmann at fhso dot ch  2007-02-10 12:17 -------

Inserting the line

 const unsigned Class::MAX_LEN=16;

results in the message

 const-test.cc:13: error: duplicate initialization of 'Class::MAX_LEN'

When I place the declaration outside the class the Symbol MAX_LEN is 
defined:

00000000 r MAX_LEN
00000028 T Class::Class(unsigned int)
00000000 T Class::Class(unsigned int)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30745


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