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

--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
Author: msebor
Date: Wed Jun 19 19:08:24 2019
New Revision: 272483

URL: https://gcc.gnu.org/viewcvs?rev=272483&root=gcc&view=rev
Log:
PR translation/90156 - add linter check suggesting to replace %<%s%> with %qs

gcc/c-family/ChangeLog:

        PR translation/90156
        * c-format.c (function_format_info::format_type): Adjust type.
        (function_format_info::is_raw): New member.
        (decode_format_type): Adjust signature.  Handle "raw" diag attributes.
        (decode_format_attr): Adjust call to decode_format_type.
        Avoid a redundant call to convert_format_name_to_system_name.
        Avoid abbreviating the word "arguments" in a diagnostic.
        (format_warning_substr): New function.
        (avoid_dollar_number): Quote dollar sign in a diagnostic.
        (finish_dollar_format_checking): Same.
        (check_format_info): Same.
        (struct baltoks_t): New.
        (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
        (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
        functions.
        (check_format_info_main): Call check_plain.  Use baltoks_t.  Call
        maybe_diag_unbalanced_tokens.
        (handle_format_attribute): Spell out the word "arguments" in
        a diagnostic.

gcc/testsuite/ChangeLog:

        PR translation/90156
        * gcc.dg/format/gcc_diag-11.c: Enable.


Modified:
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-format.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/format/gcc_diag-11.c

Reply via email to