[Bug c++/20357] New: Multiply defined assembler symbols for template instantiations
The following code produces the assembler message: "Error: symbol `_ZN1XIXadL_Z1fvEEEC1Ev' is already defined". If the declaration of f in main is omitted, everything is fine. typedef void (*Func) (); template struct X { X () {} }; void f () {} X x; int main () { void f (); X x; } -- Summary: Multiply defined assembler symbols for template instantiations Product: gcc Version: 3.3.4 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: heinlein at informatik dot uni-ulm dot de CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20357
[Bug c++/20358] New: Data member of local class of friend function of template class considered a member template
The following code produces the inappropriate error message: "data member `a' cannot be a member template". template struct X { friend void f () { struct L { int a; }; } }; int main () { X x; } -- Summary: Data member of local class of friend function of template class considered a member template Product: gcc Version: 3.3.4 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: heinlein at informatik dot uni-ulm dot de CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20358
[Bug c++/20383] New: #line directive breaks try-catch statement
The following legal input produces the error message: "`...' handler must be the last handler for its try block". int main () { try {} #line 1 "xxx" catch (int) {} } -- Summary: #line directive breaks try-catch statement Product: gcc Version: 3.3.4 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: heinlein at informatik dot uni-ulm dot de CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20383
[Bug c++/29645] New: undefined references to static const int members
Compilation of the program below produces: /tmp/cclEBTTX.o(.gnu.linkonce.t._ZN1XC1Eb+0x1a): In function `X::X[in-charge](bool)': : undefined reference to `X::a' /tmp/cclEBTTX.o(.gnu.linkonce.t._ZN1XC1Eb+0x24): In function `X::X[in-charge](bool)': : undefined reference to `X::b' collect2: ld returned 1 exit status struct X { static const int a = 1, b = 2; int x; X (bool f) : x(f ? a : b) {} }; X x(true); int main () {} Replacing e. g. "a" with "a+0" makes the errors disappear. -- Summary: undefined references to static const int members Product: gcc Version: 3.3.4 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: heinlein at informatik dot uni-ulm dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29645