https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110149
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:ae7cdc8c0f5278e7941f1de7c72ffe9f1fed2775 commit r13-7510-gae7cdc8c0f5278e7941f1de7c72ffe9f1fed2775 Author: Jonathan Wakely <jwak...@redhat.com> Date: Thu Jun 8 21:35:21 2023 +0100 libstdc++: Fix P2510R3 "Formatting pointers" [PR110149] I had intended to support the P2510R3 proposal unconditionally in C++20 mode, but I left it half implemented. The parse function supported the new extensions, but the format function didn't. This adds the missing pieces, and makes it only enabled for C++26 and non-strict modes. libstdc++-v3/ChangeLog: PR libstdc++/110149 * include/std/format (formatter<const void*, charT>::parse): Only alow 0 and P for C++26 and non-strict modes. (formatter<const void*, charT>::format): Use toupper for P type, and insert zero-fill characters for 0 option. * testsuite/std/format/functions/format.cc: Check pointer formatting. Only check P2510R3 extensions conditionally. * testsuite/std/format/parse_ctx.cc: Only check P2510R3 extensions conditionally. (cherry picked from commit 628ba410b9265dbd4278c1f1b1fadf05348adef2)