r274981 - in /trunk/gcc: cp/ChangeLog cp/cp-tre...

mpolacek@gcc.gnu.org mpolacek@gcc.gnu.org
Wed Aug 28 02:03:00 GMT 2019


Author: mpolacek
Date: Wed Aug 28 02:03:48 2019
New Revision: 274981

URL: https://gcc.gnu.org/viewcvs?rev=274981&root=gcc&view=rev
Log:
	PR c++/91428 - warn about std::is_constant_evaluated in if constexpr.
	* cp-tree.h (decl_in_std_namespace_p): Declare.
	* semantics.c (is_std_constant_evaluated_p): New.
	(finish_if_stmt_cond): Warn about "std::is_constant_evaluated ()" in
	an if-constexpr.
	* typeck.c (decl_in_std_namespace_p): No longer static.

	* g++.dg/cpp2a/is-constant-evaluated9.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/cpp2a/is-constant-evaluated9.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/semantics.c
    trunk/gcc/cp/typeck.c
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-cvs mailing list