This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15410] New: error not flagged
- From: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 May 2004 00:56:07 -0000
- Subject: [Bug c++/15410] New: error not flagged
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code compiles without error despite the template signature mismatch between the template declaration and the friend declaration.
template<typename T, typename U>
struct F;
class W {
template<int i>
friend
class F;
int x;
};
template<typename T, typename U>
struct F {
void Look(W& w) { w.x = 3; }
};
int main() {
W w;
F<char, bool> f;
f.Look(w);
return 0;
}
--
Summary: error not flagged
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igodard at pacbell dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15410