diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-26 21:58:38 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-26 21:58:38 +0000 |
commit | 806249b03daac52db84aa238dc350ca2904bf858 (patch) | |
tree | 5545278ced316fbb528d4e891ecfe7d300975c53 /gcc/cp/error.c | |
parent | d781ea5c568a3e52ee33aa39d2c7fd09530d5449 (diff) | |
download | gcc-806249b03daac52db84aa238dc350ca2904bf858.tar.gz |
Allow partial specialization of variable templates.
* cp-tree.h (TINFO_USED_TEMPLATE_ID): New.
* decl.c (duplicate_decls): Copy it.
* error.c (dump_decl) [TEMPLATE_ID_EXPR]: Handle variables.
* parser.c (cp_parser_decltype_expr): Do call finish_id_expression
on template-ids.
* pt.c (register_specialization): Remember variable template insts.
(instantiate_template_1): Find the matching partial specialization.
(check_explicit_specialization): Allow variable partial specialization.
(process_partial_specialization): Likewise.
(push_template_decl_real): Likewise.
(more_specialized_partial_spec): Rename from more_specialized_class.
(most_specialized_partial_spec): Rename from most_specialized_class.
(get_partial_spec_bindings): Rename from get_class_bindings.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218104 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r-- | gcc/cp/error.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 7d79771ec26..5dcc149e185 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -1212,7 +1212,9 @@ dump_decl (cxx_pretty_printer *pp, tree t, int flags) tree args = TREE_OPERAND (t, 1); if (is_overloaded_fn (name)) - name = DECL_NAME (get_first_fn (name)); + name = get_first_fn (name); + if (DECL_P (name)) + name = DECL_NAME (name); dump_decl (pp, name, flags); pp_cxx_begin_template_argument_list (pp); if (args == error_mark_node) |