r276605 - in /trunk/gcc: c-family/ChangeLog c-f...

jsm28@gcc.gnu.org jsm28@gcc.gnu.org
Fri Oct 4 21:56:00 GMT 2019


Author: jsm28
Date: Fri Oct  4 21:56:14 2019
New Revision: 276605

URL: https://gcc.gnu.org/viewcvs?rev=276605&root=gcc&view=rev
Log:
Add strftime format checking support for C2x %OB and %Ob (bug 82752).

C2x adds strftime %OB and %Ob formats, for alternative forms of month
names (for mainly Slavic languages where a month name on its own is
declined differently from a month name together with a date within
that month).  This patch adds corresponding format checking support.
(glibc support for these formats was added in glibc 2.27.)

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

	PR c/82752
gcc/c-family:
	* c-format.c (C_STD_VER): Handle C2x.
	(C_STD_NAME): Likewise.
	(strftime_flag_specs): Add 'O' modifier with 'p' flag.
	(time_char_table): Use separate entry for 'B' and 'b', with 'O'
	modifier allowed and 'p' flag.
	* c-format.h (enum format_std_version): Add STD_C2X.
	(struct format_char_info): Mention 'p' in comment on flags2.

gcc/testsuite:
	* gcc.dg/format/c2x-strftime-1.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/format/c2x-strftime-1.c
Modified:
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-format.c
    trunk/gcc/c-family/c-format.h
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-cvs mailing list