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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:9aeadd8c319d5d940fa4dc91a393fc2959d27719

commit r12-3258-g9aeadd8c319d5d940fa4dc91a393fc2959d27719
Author: Jason Merrill <ja...@redhat.com>
Date:   Mon Aug 30 18:42:05 2021 -0400

    c++: Improve error recovery with constexpr [PR92193]

    The compiler tries to limit error cascades in limit_bad_template_recursion
    by avoiding triggering a new instantiation from one that has caused errors.
    We were exempting constexpr functions from this because they can be needed
    for constant evaluation, but as more and more functions get marked
    constexpr, this becomes an over-broad category.  So as suggested on IRC,
    this patch only exempts functions that are needed for mandatory constant
    evaluation.

    As noted in the comment, this flag doesn't particularly need to use a bit
in
    the FUNCTION_DECL, but there were still some free.

            PR c++/92193

    gcc/cp/ChangeLog:

            * cp-tree.h (FNDECL_MANIFESTLY_CONST_EVALUATED): New.
            * constexpr.c (cxx_eval_call_expression): Set it.
            * pt.c (neglectable_inst_p): Check it.

    gcc/testsuite/ChangeLog:

            * g++.dg/diagnostic/static_assert4.C: New test.

Reply via email to