https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103758
--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>: https://gcc.gnu.org/g:a59360efef52468ad4648304f7ba56037f130a9a commit r11-9472-ga59360efef52468ad4648304f7ba56037f130a9a Author: Marek Polacek <pola...@redhat.com> Date: Fri Dec 17 14:34:12 2021 -0500 c-family: Have -Wformat-diag accept "decl-specifier" [PR103758] I'm tired of seeing cp/parser.c:15923:55: warning: misspelled term 'decl' in format; use 'declaration' instead [-Wformat-diag] cp/parser.c:15925:57: warning: misspelled term 'decl' in format; use 'declaration' instead [-Wformat-diag] every time I compile cp/parser.c, which happens...a lot. I'd like my compilation to be free of warnings, otherwise I'm going to miss some important ones. "decl-specifiers" is a C++ grammar term; it is not actual code, so should not be wrapped with %< %>. I hope we can accept it as an exception in check_tokens. It was surrounded by %< %> in cp_parser_decl_specifier_seq, so fix that. In passing, fix a misspelling in missspellings. PR c++/103758 gcc/c-family/ChangeLog: * c-format.c (check_tokens): Accept "decl-specifier*". gcc/cp/ChangeLog: * parser.c (cp_parser_decl_specifier_seq): Replace %<decl-specifier%> with %qD. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/constexpr-condition.C: Adjust dg-error. (cherry picked from commit bb936163e28fdbe1a751c55d5e5975e036322a3d)