+2020-02-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR other/93641
+ * c-format.c (check_plain): Fix up last argument of strncasecmp.
+ Remove useless extra test.
+
2020-02-03 Julian Brown <julian@codesourcery.com>
Tobias Burnus <tobias@codesourcery.com>
"quoted %qs directive in format; "
"use %qs instead", "%s", "%qs");
else if (format_chars - orig_format_chars > 2
- && !strncasecmp (format_chars - 3, "can%'t", 5)
- && !ISALPHA (format_chars[1]))
+ && !strncasecmp (format_chars - 3, "can%'t", 6))
format_warning_substr (format_string_loc,
format_string_cst,
fmtchrpos - 3, fmtchrpos + 3, opt,
+2020-02-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR other/93641
+ * gcc.dg/format/gcc_diag-11.c (test_cdiag_bad_words): Add two further
+ tests.
+
2020-02-10 Feng Xue <fxue@os.amperecomputing.com>
PR ipa/93203
cdiag ("you can't do that"); /* { dg-warning "contraction 'can't' in format" } */
cdiag ("you can%'t do that");/* { dg-warning "contraction 'can%'t' in format" } */
cdiag ("Can%'t touch this.");/* { dg-warning "contraction 'Can%'t' in format" } */
+ cdiag ("can%'");
+ cdiag ("can%' whatever");
cdiag ("on the commandline");/* { dg-warning "misspelled term 'commandline' in format; use 'command line' instead" } */
cdiag ("command line option");/* { dg-warning "misspelled term 'command line option' in format; use 'command-line option' instead" } */
cdiag ("it mustn't be"); /* { dg-warning "contraction 'mustn't' in format" } */