[Bug c++/124489] [reflection] Missing space when printing "constexpr std::meta::info"

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Mar 16 22:00:26 GMT 2026


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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>:

https://gcc.gnu.org/g:a65cafbc522d97439ff58e939d88c2a0e83ea516

commit r16-8116-ga65cafbc522d97439ff58e939d88c2a0e83ea516
Author: Marek Polacek <polacek@redhat.com>
Date:   Fri Mar 13 13:00:46 2026 -0400

    c++: fix for printing std::meta::info [PR124489]

    When printing the diagnostics in this test, we're saying
    "constexprstd::meta::info dm" which misses a space.  We
    should use pp_cxx_ws_string which does pp_c_maybe_whitespace
    when printing "std::meta::info".

            PR c++/124489

    gcc/cp/ChangeLog:

            * error.cc (dump_type) <case NULLPTR_TYPE>: Use pp_cxx_ws_string
            instead of pp_string.
            <case META_TYPE>: Likewise.

    gcc/testsuite/ChangeLog:

            * g++.dg/reflect/diag6.C: New test.

    Reviewed-by: Jason Merrill <jason@redhat.com>


More information about the Gcc-bugs mailing list