r278755 - in /trunk/gcc: cp/ChangeLog cp/conste...

jason@gcc.gnu.org jason@gcc.gnu.org
Wed Nov 27 03:14:00 GMT 2019


Author: jason
Date: Wed Nov 27 03:14:33 2019
New Revision: 278755

URL: https://gcc.gnu.org/viewcvs?rev=278755&root=gcc&view=rev
Log:
Remember the location of a variable template-id.

I noticed that tsubst of a TEMPLATE_ID_EXPR was losing the location
information from its EXPR_LOCATION.  Then I noticed that
cxx_eval_constant_expression was also throwing away location information for
variable references.

	* pt.c (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Remember the
	location of a variable template-id.
	* constexpr.c (cxx_eval_constant_expression): Get expr location
	before stripping location wrappers.
	(non_const_var_error): Take location argument.

Added:
    trunk/gcc/testsuite/g++.dg/cpp1y/var-templ64.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/constexpr.c
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/g++.dg/concepts/pr67595.C



More information about the Gcc-cvs mailing list