This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17161] New: failure to diagnose an ill-formed instantiation on a local type
- From: "sebor at roguewave dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Aug 2004 00:42:33 -0000
- Subject: [Bug c++/17161] New: failure to diagnose an ill-formed instantiation on a local type
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Gcc 3.4 fails to diagnose the following ill-formed program.
$ cat t.cpp && g++ --version && g++ t.cpp -Wextra -W -pedantic
struct S {
void foo (unsigned long) { }
template <class T> void foo (T) { }
};
int main ()
{
enum E { e };
S ().foo (e); // local types are not allowed as template arguments
}
g++ (GCC) 3.4.0
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--
Summary: failure to diagnose an ill-formed instantiation on a
local type
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sebor at roguewave dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: all
GCC host triplet: all
GCC target triplet: all
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17161