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

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

https://gcc.gnu.org/g:4ee692337c4ec18fe9be3df34f3607ea3de5ef93

commit r15-3631-g4ee692337c4ec18fe9be3df34f3607ea3de5ef93
Author: Jason Merrill <ja...@redhat.com>
Date:   Thu Sep 12 16:22:02 2024 -0400

    c++: -fimplicit-constexpr diagnostic improvement [PR116696]

    PR116696 expressed surprise that explicit 'constexpr' was needed on one
    function; this was because the function isn't 'inline', and
    -fimplicit-constexpr doesn't try to promote non-inline functions.  Let's be
    more helpful in that situation, and also help trace through functions that
    were promoted.

            PR c++/116696

    gcc/cp/ChangeLog:

            * constexpr.cc (explain_invalid_constexpr_fn): When
            -fimplicit-constexpr, also explain inline functions, and point out
            non-inline functions.

    gcc/testsuite/ChangeLog:

            * g++.dg/DRs/dr2478.C: Prune extra diagnostic.
            * g++.dg/ext/fimplicit-constexpr1.C: New test.

Reply via email to