[Bug c++/44215] New: undefinied reference with static constant initialized data member in conditional expression
doreille at smr dot ch
gcc-bugzilla@gcc.gnu.org
Thu May 20 17:52:00 GMT 2010
The following code raise undefined reference link errors:
toto.C:(.text+0x10): undefined reference to `A::a'
toto.C:(.text+0x18): undefined reference to `B::a'
The code:
struct A {
static const int a = 0;
};
struct B {
static const int a = 1;
};
int main() {
bool b = true;
return b ? A::a : B::a;
}
--
Summary: undefinied reference with static constant initialized
data member in conditional expression
Product: gcc
Version: 4.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: doreille at smr dot ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44215
More information about the Gcc-bugs
mailing list