This is the mail archive of the gcc-patches@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]

Patch ping (Re: [C++ PATCH] Fix __builtin_{is_constant_evaluated,constant_p} handling in static_assert (PR c++/86524, PR c++/88446))


Hi!

On Wed, Dec 12, 2018 at 11:30:37PM +0100, Jakub Jelinek wrote:
> 2018-12-12  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR c++/86524
> 	PR c++/88446
> 	* cp-tree.h (fold_non_dependent_expr): Add manifestly_const_eval
> 	argument.
> 	* constexpr.c (cxx_eval_builtin_function_call): Evaluate
> 	__builtin_constant_p if ctx->manifestly_const_eval even in constexpr
> 	functions.  For arguments to builtins, if ctx->manifestly_const_eval
> 	try to first evaluate arguments with it, but if that doesn't result
> 	in a constant expression, retry without it.  Fix comment typo.
> 	(fold_non_dependent_expr): Add manifestly_const_eval argument, pass
> 	it through to cxx_eval_outermost_constant_expr and
> 	maybe_constant_value.
> 	* semantics.c (finish_static_assert): Call fold_non_dependent_expr
> 	with true as manifestly_const_eval.
> 
> 	* g++.dg/cpp1y/constexpr-86524.C: New test.
> 	* g++.dg/cpp2a/is-constant-evaluated4.C: New test.
> 	* g++.dg/cpp2a/is-constant-evaluated5.C: New test.
> 	* g++.dg/cpp2a/is-constant-evaluated6.C: New test.

I'd like to ping this patch.

Thanks.

	Jakub


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