PR43651: add warning for duplicate qualifier
authorMikhail Maltsev <maltsevm@gmail.com>
Wed, 11 May 2016 20:23:37 +0000 (20:23 +0000)
committerMikhail Maltsev <miyuki@gcc.gnu.org>
Wed, 11 May 2016 20:23:37 +0000 (20:23 +0000)
commitd6e83a8dec2b4fd3a92e87add4fa0485dd87d9f7
tree53be56313df606591b5a5db27a863bed98dc7f1a
parent51e67ea376b70fd41542c1540d809a32f10ed9ca
PR43651: add warning for duplicate qualifier

gcc/c/

PR c/43651
* c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
is enabled.
* c-errors.c (pedwarn_c90): Return true if warned.
* c-tree.h (pedwarn_c90): Change return type to bool.
(enum c_declspec_word): Add new enumerator cdw_atomic.

gcc/

PR c/43651
* doc/invoke.texi (Wduplicate-decl-specifier): Document new option.

gcc/testsuite/

PR c/43651
* gcc.dg/Wduplicate-decl-specifier-c11.c: New test.
* gcc.dg/Wduplicate-decl-specifier.c: Likewise.

gcc/c-family/

PR c/43651
* c.opt (Wduplicate-decl-specifier): New option.

From-SVN: r236142
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c.opt
gcc/c/ChangeLog
gcc/c/c-decl.c
gcc/c/c-errors.c
gcc/c/c-tree.h
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Wduplicate-decl-specifier-c11.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Wduplicate-decl-specifier.c [new file with mode: 0644]