Skip to content
Snippets Groups Projects
Commit eb35e343 authored by Joseph Myers's avatar Joseph Myers
Browse files

c: Handle printf %B like %b for C2x

WG14 decided to change the printf %B format from a recommended
extension to an optional feature defined in normative text.  Thus,
change the format checking to handle %B like %b, so not diagnosing it
with -Wformat -std=c2x -pedantic, just as with other optional
normatively defined features (such as decimal floating point and its
associated formats, for example).

Bootstrapped with no regressions for x86_64-pc-linux-gnu.

gcc/c-family/
	* c-format.cc (print_char_table): Handle %B like %b.

gcc/testsuite/
	* gcc.dg/format/c2x-printf-1.c: Test %B here.
	* gcc.dg/format/ext-9.c: Do not test %B here.
parent 6c6f9604
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment