re PR c++/82466 (Missing warning for re-declaration of built-in function as variable)
authorPaolo Carlini <paolo@gcc.gnu.org>
Tue, 24 Oct 2017 19:01:03 +0000 (19:01 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 24 Oct 2017 19:01:03 +0000 (19:01 +0000)
commitff1ff960f5039cf1d2970bfe2ba965d1b994caf1
treed7532f5e24aa854260ecf9ab34990aa58a76a622
parentf9f43fb3a83af7dc6b2f89d6691ccd33b0b90196
re PR c++/82466 (Missing warning for re-declaration of built-in function as variable)

2017-10-24  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/82466
* doc/invoke.texi ([Wbuiltin-declaration-mismatch]): Extend
description.

/cp
2017-10-24  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/82466
* decl.c (duplicate_decls): Warn for built-in functions declared as
non-function, use OPT_Wbuiltin_declaration_mismatch.

* decl.c (duplicate_decls): Avoid redundant '+' in warning_at.

/c
2017-10-24  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/82466
* c-decl.c (diagnose_mismatched_decls): Use
OPT_Wbuiltin_declaration_mismatch.

/testsuite
2017-10-24  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/82466
* c-c++-common/Wbuiltin-declaration-mismatch-1.c: New.
* c-c++-common/Wno-builtin-declaration-mismatch-1.c: Likewise.
* g++.dg/warn/Wbuiltin_declaration_mismatch-1.C: Likewise.
* g++.dg/parse/builtin2.C: Adjust.
* g++.old-deja/g++.mike/p811.C: Likewise.

From-SVN: r254057
12 files changed:
gcc/ChangeLog
gcc/c/ChangeLog
gcc/c/c-decl.c
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wbuiltin-declaration-mismatch-1.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/Wno-builtin-declaration-mismatch-1.c [new file with mode: 0644]
gcc/testsuite/g++.dg/parse/builtin2.C
gcc/testsuite/g++.dg/warn/Wbuiltin_declaration_mismatch-1.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.mike/p811.C