aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2022-12-05 12:23:57 +0000
committerJonathan Wakely <jwakely@redhat.com>2022-12-06 21:33:29 +0000
commit48e21e878b2c6cfc7797088a7393a735de75883c (patch)
treea9cf68c07d14eccf8aaa5f6a1a5d0ea724dc64a8 /libcpp
parentba1536dac780f3f92c5eab999fda6931f6247fc1 (diff)
downloadgcc-48e21e878b2c6cfc7797088a7393a735de75883c.zip
gcc-48e21e878b2c6cfc7797088a7393a735de75883c.tar.gz
gcc-48e21e878b2c6cfc7797088a7393a735de75883c.tar.bz2
libstdc++: The Trouble with Tribbles
Fix digit grouping for integers formatted with "{:#Lx}" which were including the "0x" prefix in the grouped digits. This resulted in output like "0,xff,fff" instead of "0xff,fff". Also change std:::basic_format_parse_context to not throw for an arg-id that is larger than the actual number of format arguments. I clarified with Victor Zverovich that this is the intended behaviour for the run-time format-string checks. An out-of-range arg-id should be diagnosed at compile-time (as clarified by LWG 3825) but not run-time. The formatting function will still throw at run-time when args.arg(id) returns an empty basic_format_arg. libstdc++-v3/ChangeLog: * include/std/format (basic_format_parse_context::next_arg_id): Only check arg-id is in range during constant evaluation. * testsuite/std/format/functions/format.cc: Check "{:#Lx}". * testsuite/std/format/parse_ctx.cc: Adjust expected results for format-strings using an out-of-range arg-id.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions