This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Author: jason
Date: Tue Nov 15 14:55:52 2016
New Revision: 242422

URL: https://gcc.gnu.org/viewcvs?rev=242422&root=gcc&view=rev
Log:
Allow references in constant-expressions.

	* decl2.c (decl_maybe_constant_var_p): References qualify.
	* constexpr.c (non_const_var_error): Handle references.
	* init.c (constant_value_1): Always check decl_constant_var_p.
	* cp-gimplify.c (cp_fold_maybe_rvalue): Don't fold references.
	* error.c (dump_decl_name): Split out from dump_decl.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-ref10.C
    trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-ref9.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/constexpr.c
    trunk/gcc/cp/cp-gimplify.c
    trunk/gcc/cp/decl2.c
    trunk/gcc/cp/error.c
    trunk/gcc/cp/init.c


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]