[gcc r13-10218] c++: fix for printing std::meta::info [PR124489]

Jakub Jelinek jakub@gcc.gnu.org
Sun Mar 22 05:22:24 GMT 2026


https://gcc.gnu.org/g:03c46271bd7e05f137f6b1ba09902cc76f8a8d4b

commit r13-10218-g03c46271bd7e05f137f6b1ba09902cc76f8a8d4b
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.
    
    Reviewed-by: Jason Merrill <jason@redhat.com>
    (cherry picked from commit a65cafbc522d97439ff58e939d88c2a0e83ea516)

Diff:
---
 gcc/cp/error.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/cp/error.cc b/gcc/cp/error.cc
index a5d888926a6d..a9e9c9164e15 100644
--- a/gcc/cp/error.cc
+++ b/gcc/cp/error.cc
@@ -722,7 +722,7 @@ dump_type (cxx_pretty_printer *pp, tree t, int flags)
       break;
 
     case NULLPTR_TYPE:
-      pp_string (pp, "std::nullptr_t");
+      pp_cxx_ws_string (pp, "std::nullptr_t");
       break;
 
     default:


More information about the Gcc-cvs mailing list