This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/25220] New: [g++] (in class) static (const integral) member initialization.
- From: "marcin-konarski at o2 dot pl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Dec 2005 10:32:10 -0000
- Subject: [Bug c++/25220] New: [g++] (in class) static (const integral) member initialization.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Linker complains about undefined reference to `symbol'
during build of the folowing code:
struct A {
int const static a0 = 0;
int const static a1 = 1;
};
int
main ( int argc, char ** ) {
int a = argc ? A::a0 : A::a1;
return ( a );
}
--
Summary: [g++] (in class) static (const integral) member
initialization.
Product: gcc
Version: 4.0.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: marcin-konarski at o2 dot pl
GCC build triplet: i386-pc-linux-gnu
GCC host triplet: i386-pc-linux-gnu
GCC target triplet: i386-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25220