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

[Bug c++/88446] __builtin_is_constant_evaluated rejects some converted constant expressions.


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88446

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Dec 12 08:44:27 2018
New Revision: 267047

URL: https://gcc.gnu.org/viewcvs?rev=267047&root=gcc&view=rev
Log:
        PR c++/88446
        * cp-tree.h (maybe_constant_value): Add manifestly_const_eval
        argument.
        * constexpr.c (struct constexpr_call): Rename pretend_const_required
        member to manifestly_const_eval.
        (struct constexpr_ctx): Likewise.
        (constexpr_call_hasher::equal): Adjust users.
        (cxx_eval_builtin_function_call): Likewise.  Formatting fix.
        (cxx_eval_call_expression): Adjust users.
        (cxx_eval_outermost_constant_expr, maybe_constant_init_1,
        maybe_constant_init): Rename pretend_const_required argument to
        manifestly_const_eval, adjust function comments.
        (maybe_constant_value): Add manifestly_const_eval argument.  If true,
        don't cache and call cxx_eval_outermost_constant_expr with true as
        manifestly_const_eval.
        * decl.c (compute_array_index_type_loc): Call maybe_constant_value
        with true as manifestly_const_eval.

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

Added:
    trunk/gcc/testsuite/g++.dg/cpp2a/is-constant-evaluated3.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/constexpr.c
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/decl.c
    trunk/gcc/testsuite/ChangeLog

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