[Bug c++/66923] Variable template initialized using auto deduces wrong type
jason at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Aug 5 17:56:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66923
--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Wed Aug 5 17:56:14 2015
New Revision: 226642
URL: https://gcc.gnu.org/viewcvs?rev=226642&root=gcc&view=rev
Log:
PR c++/66260
PR c++/66596
PR c++/66649
PR c++/66923
* pt.c (lookup_template_variable): Use NULL_TREE for type.
(instantiate_template_1): Also set DECL_TI_ARGS based on
the immediate parent.
(tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle variable templates.
(finish_template_variable): Add complain parm.
* cp-tree.h: Adjust.
Added:
trunk/gcc/testsuite/g++.dg/cpp1y/var-templ36.C
trunk/gcc/testsuite/g++.dg/cpp1y/var-templ38.C
trunk/gcc/testsuite/g++.dg/cpp1y/var-templ39.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/g++.dg/cpp1y/var-templ32.C
trunk/gcc/testsuite/g++.dg/cpp1y/var-templ35.C
More information about the Gcc-bugs
mailing list