This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/24664] New: Template instantiation generating an array of voids doesn't fail
- From: "jconner at apple dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Nov 2005 02:30:12 -0000
- Subject: [Bug c++/24664] New: Template instantiation generating an array of voids doesn't fail
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code, pulled from an example in section 14.8.2.2 of ISO C++,
should fail to compile, but doesn't:
template<class T> int f(T[5]);
int j=f<void>(0);
A function template instantiation should fail if it would create an array with
void elements.
--
Summary: Template instantiation generating an array of voids
doesn't fail
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jconner at apple dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24664