This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11756] New: ICE's when using typeof in template function parameter type declarations
- 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: 1 Aug 2003 00:58:02 -0000
- Subject: [Bug c++/11756] New: ICE's when using typeof in template function parameter type declarations
- 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=11756
Summary: ICE's when using typeof in template function parameter
type declarations
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
The following code triggers an ICE in write_type, at cp/mangle.c:1517 (line 1473
in gcc 3.2.3):
struct S { void f (); };
template <typename T> int g (typeof(&T::f));
int const i = g<S>(0);
The following related simpler but illegal code triggers an ICE in
cp_parser_template_id, at cp/parser.c:7515 :
template <typename T> int h (typeof(&T));
int const j = h<int>(0);
I'm using gcc version 3.4 20030723.