https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82752

--- Comment #2 from Joseph S. Myers <jsm28 at gcc dot gnu.org> ---
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

Reply via email to