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. From-SVN: r276605
Showing
gcc/testsuite/gcc.dg/format/c2x-strftime-1.c
0 → 100644
Please
register
or
sign in
to comment