aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.h
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2006-12-08 06:27:22 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2006-12-08 06:27:22 +0000
commit9ba7a2f2926541d4db21c6df15acc783b73e1f4f (patch)
tree7ba5569ae3e14325934f7a9e8cdf809c494d4870 /gcc/cp/cp-tree.h
parentcf71109bd6749b28e07670d2cf8eb7d3c216f531 (diff)
downloadgcc-9ba7a2f2926541d4db21c6df15acc783b73e1f4f.zip
gcc-9ba7a2f2926541d4db21c6df15acc783b73e1f4f.tar.gz
gcc-9ba7a2f2926541d4db21c6df15acc783b73e1f4f.tar.bz2
re PR c++/29732 (ICE on invalid friend declaration)
PR c++/29732 * cp-tree.h (DECL_USE_TEMPLATE): Mention partial specializations. (explicit_class_specialization_p): Declare. * pt.c (explicit_class_specialization_p): New function. * parser.c (cp_parser_init_declarator): Check correct number of template parameters for in-class function definitions. (cp_parser_check_declrator_template_parameters): Stop looking for template classes when we find an explicit specialization. PR c++/29732 * g++.dg/template/crash65.C: New test. * g++.dg/template/spec16.C: Tweak error markers. From-SVN: r119649
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r--gcc/cp/cp-tree.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index ae250bf..e59586b 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -2879,8 +2879,14 @@ extern void decl_shadowed_for_var_insert (tree, tree);
indicates the type of specializations:
1=implicit instantiation
- 2=explicit specialization, e.g. int min<int> (int, int);
- 3=explicit instantiation, e.g. template int min<int> (int, int);
+
+ 2=partial or explicit specialization, e.g.:
+
+ template <> int min<int> (int, int),
+
+ 3=explicit instantiation, e.g.:
+
+ template int min<int> (int, int);
Note that NODE will be marked as a specialization even if the
template it is instantiating is not a primary template. For
@@ -4168,6 +4174,7 @@ extern tree build_non_dependent_expr (tree);
extern tree build_non_dependent_args (tree);
extern bool reregister_specialization (tree, tree, tree);
extern tree fold_non_dependent_expr (tree);
+extern bool explicit_class_specialization_p (tree);
/* in repo.c */
extern void init_repo (void);