This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11857] New: Array of T=void allowed as function parameter type when T is a template parameter
- From: "gccbugs at contacts dot eelis dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Aug 2003 20:13:24 -0000
- Subject: [Bug c++/11857] New: Array of T=void allowed as function parameter type when T is a template parameter
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11857
Summary: Array of T=void allowed as function parameter type when
T is a template parameter
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gccbugs at contacts dot eelis dot net
CC: gcc-bugs at gcc dot gnu dot org
Arrays of void are not allowed (8.3.4 para 1). However, GCC fails to detect
these when the void element type is a template parameter. GCC compiles the
following code without errors:
template <typename T> void f (T []);
void g () { f<void>(0); }
Comeau does detect this, and says: "error: array of void is not allowed".
I'm using GCC version 3.4 20030723.