[Bug c++/89244] __builtin_is_constant_evaluated not documented
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Feb 10 00:01:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89244
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |ASSIGNED
Last reconfirmed| |2019-02-10
Resolution|INVALID |---
Ever confirmed|0 |1
--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
As bug 88977 shows, people use the built-in directly; sooner or later, they
always do, whether or not the built-ins are intended to be. Before confirming
that bug I went looking for its documentation to make sure I wasn't missing
something and found none, so all I had to go on was the C++ proposal.
GCC documents the vast majority of built-ins, whether or not they are meant to
be used directly. There are countless examples, including the atomic
built-ins, __builtin_setjmp and _longjmp for nonlocal Gotos, or
__builtin_object_size. The manual even exhaustively lists all the C library
functions that it provides built-ins for, even though there is little reason to
do that. As Jonathan points out, the C++ Type Traits built-ins are documented
as well. The target sections of the manual exhaustively enumerate
target-specific intrinsics (regrettably, often without specifying their
semantics) even though there are higher-level APIs that users are expected to
use.
This is all immensely helpful, both to users and to GCC developers. Let me
take care of adding something for __builtin_is_constant_evaluated.
More information about the Gcc-bugs
mailing list