C++ PATCH for c++/53858 (parse error with alias template)

Submitted by Jason Merrill on July 6, 2012, 1:41 p.m.

Details

Message ID 4FF6EB24.6050807@redhat.com
State New
Headers show

Commit Message

Jason Merrill July 6, 2012, 1:41 p.m.
Since my fix for 53563, we were ignoring alias templates when looking 
for a type template name.  Fixed thus.

Tested x86_64-pc-linux-gnu, applying to trunk.

Patch hide | download patch | download mbox

commit 41eec657beceaa04ecbd7a459f2e9a42ef878173
Author: Jason Merrill <jason@redhat.com>
Date:   Fri Jul 6 09:22:38 2012 -0400

    	* cp-tree.h (DECL_DECLARES_TYPE_P): Check DECL_TYPE_TEMPLATE_P.

diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 0b2b234..713001e 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -3704,7 +3704,7 @@  more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter)
 
 /* Nonzero for a NODE which declares a type.  */
 #define DECL_DECLARES_TYPE_P(NODE) \
-  (TREE_CODE (NODE) == TYPE_DECL || DECL_CLASS_TEMPLATE_P (NODE))
+  (TREE_CODE (NODE) == TYPE_DECL || DECL_TYPE_TEMPLATE_P (NODE))
 
 /* Nonzero if NODE declares a function.  */
 #define DECL_DECLARES_FUNCTION_P(NODE) \