This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/29704] [4.1 Regression] ICE: default non-type template argument of pointer-to-member type
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jan 2008 12:57:48 -0000
- Subject: [Bug c++/29704] [4.1 Regression] ICE: default non-type template argument of pointer-to-member type
- References: <bug-29704-1824@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from rguenth at gcc dot gnu dot org 2008-01-13 12:57 -------
3.4 rejects this with
t.C:6: error: `((void (C::*)(int)))0)' is not a valid template argument
t.C:6: error: it must be a pointer-to-member of the form `&X::Y'
t.C:6: error: invalid type in declaration before ';' token
4.0 wrongly accepts it. 4.2 rejects it with:
t.C:6: error: a cast to a type other than an integral or enumeration type
cannot appear in a constant-expression
t.C:6: error: template argument 1 is invalid
t.C:6: error: invalid type in declaration before ?;? token
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |accepts-invalid, ice-on-
| |invalid-code
Known to fail| |4.0.4 4.1.3
Known to work| |3.4.6 4.2.0
Last reconfirmed|0000-00-00 00:00:00 |2008-01-13 12:57:48
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29704