Commit 16a919a7 by Martin Sebor Committed by Martin Sebor

extend.texi (Other Builtins): Add __builtin_is_constant_evaluated.


gcc/ChangeLog:

	* doc/extend.texi (Other Builtins): Add
	__builtin_is_constant_evaluated.

From-SVN: r269129
parent c87cc0c0
2019-02-22 Martin Sebor <msebor@redhat.com>
* doc/extend.texi (Other Builtins): Add
__builtin_is_constant_evaluated.
2019-02-22 Richard Biener <rguenther@suse.de> 2019-02-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/87609 PR tree-optimization/87609
...@@ -28,6 +33,17 @@ ...@@ -28,6 +33,17 @@
2019-02-22 Martin Sebor <msebor@redhat.com> 2019-02-22 Martin Sebor <msebor@redhat.com>
PR tree-optimization/88993
PR tree-optimization/88853
* gimple-ssa-sprintf.c (sprintf_dom_walker::call_info::is_file_func):
New helper.
(sprintf_dom_walker::call_info::is_string_func): New helper.
(format_directive): Only issue "may exceed" 4095/INT_MAX warnings
for formatted string functions.
(sprintf_dom_walker::handle_gimple_call): Fix a typo in a comment.
2019-02-22 Martin Sebor <msebor@redhat.com>
PR c/89425 PR c/89425
* c-parser.c (sizeof_ptr_memacc_comptypes): Avoid warning in * c-parser.c (sizeof_ptr_memacc_comptypes): Avoid warning in
unreachable subexpressions. unreachable subexpressions.
......
...@@ -12890,6 +12890,23 @@ built-in in this case, because it has no opportunity to perform ...@@ -12890,6 +12890,23 @@ built-in in this case, because it has no opportunity to perform
optimization. optimization.
@end deftypefn @end deftypefn
@deftypefn {Built-in Function} bool __builtin_is_constant_evaluated (void)
The @code{__builtin_is_constant_evaluated} function is available only
in C++. The built-in is intended to be used by implementations of
the @code{std::is_constant_evaluated} C++ function. Programs should make
use of the latter function rather than invoking the built-in directly.
The main use case of the built-in is to determine whether a @code{constexpr}
function is being called in a @code{constexpr} context. A call to
the function evaluates to a core constant expression with the value
@code{true} if and only if it occurs within the evaluation of an expression
or conversion that is manifestly constant-evaluated as defined in the C++
standard. Manifestly constant-evaluated contexts include constant-expressions,
the conditions of @code{constexpr if} statements, constraint-expressions, and
initializers of variables usable in constant expressions. For more details
refer to the latest revision of the C++ standard.
@end deftypefn
@deftypefn {Built-in Function} long __builtin_expect (long @var{exp}, long @var{c}) @deftypefn {Built-in Function} long __builtin_expect (long @var{exp}, long @var{c})
@opindex fprofile-arcs @opindex fprofile-arcs
You may use @code{__builtin_expect} to provide the compiler with You may use @code{__builtin_expect} to provide the compiler with
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment