diff options
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/c-format.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/c-family/c-format.c b/gcc/c-family/c-format.c index 7d3b311..afa7781 100644 --- a/gcc/c-family/c-format.c +++ b/gcc/c-family/c-format.c @@ -3194,7 +3194,7 @@ check_tokens (const token_t *tokens, unsigned ntoks, wlen, format_chars); else { - /* Diagnose some common missspellings. */ + /* Diagnose some common misspellings. */ for (unsigned i = 0; i != sizeof badwords / sizeof *badwords; ++i) { unsigned badwlen = strspn (badwords[i].name, " -"); @@ -3215,6 +3215,12 @@ check_tokens (const token_t *tokens, unsigned ntoks, plural = "s"; } + /* As an exception, don't warn about "decl-specifier*" since + it's a C++ grammar production. */ + if (badwords[i].name[0] == 'd' + && startswith (format_chars, "decl-specifier")) + continue; + format_warning_substr (format_string_loc, format_string_cst, fmtchrpos, fmtchrpos + badwords[i].len, opt, |