This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/30745] Undefined static const
- From: "hans dot buchmann at fhso dot ch" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Feb 2007 12:17:15 -0000
- Subject: [Bug c++/30745] Undefined static const
- References: <bug-30745-4888@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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