Allow non-constexpr variable templates.
authorJason Merrill <jason@redhat.com>
Sat, 23 Aug 2014 06:51:58 +0000 (02:51 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Sat, 23 Aug 2014 06:51:58 +0000 (02:51 -0400)
commit5e0231c231404677aa1b90e499b54cc1ff6328a4
treec98497e8bebb0ca8566b2a4a78834a6b21529061
parenta545cacd6840d61110cb2d4b17444bf95fe64959
Allow non-constexpr variable templates.

* decl2.c (note_variable_template_instantiation): New.
* cp-tree.h: Declare it.
* pt.c (instantiate_decl): Call it.
(push_template_decl_real): Allow non-constexpr variable templates.
* semantics.c (finish_id_expression): Mark the variable template
instantiation as used.
* mangle.c (write_mangled_name): Variable template instantiations
are mangled.
* parser.c (cp_parser_init_declarator): Complain about
non-function implicit templates.

From-SVN: r214396
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl2.c
gcc/cp/mangle.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/testsuite/g++.dg/cpp1y/pr59638.C
gcc/testsuite/g++.dg/cpp1y/pr60626.C
gcc/testsuite/g++.dg/cpp1y/var-templ7.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.pt/var1.C