[Bug c++/37093] [4.2/4.3/4.4 Regression] ICE with pointer to member template parameters
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Dec 30 05:23:00 GMT 2008
------- Comment #12 from pinskia at gcc dot gnu dot org 2008-12-30 05:22 -------
(In reply to comment #11)
> Patch which I am testing:
> Index: pt.c
> ===================================================================
> --- pt.c (revision 142951)
> +++ pt.c (working copy)
> @@ -4626,6 +4626,13 @@ convert_nontype_argument (tree type, tre
> expr = perform_qualification_conversions (type, expr);
> if (expr == error_mark_node)
> return expr;
> + if (TREE_CODE (expr) != PTRMEM_CST)
> + {
> + error ("%qE is not a valid template argument for type %qT "
> + "because it not a pointer-to-member of the form `&X::Y'",
> + expr, type);
> + return NULL_TREE;
> + }
The test has go in front of perform_qualification_conversions with an extra
STRIP_NOPS.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37093
More information about the Gcc-bugs
mailing list