aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/Wbuiltin-declaration-mismatch-1.c
diff options
context:
space:
mode:
authorPaolo Carlini <paolo@gcc.gnu.org>2017-10-24 19:01:03 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2017-10-24 19:01:03 +0000
commitff1ff960f5039cf1d2970bfe2ba965d1b994caf1 (patch)
treed7532f5e24aa854260ecf9ab34990aa58a76a622 /gcc/testsuite/c-c++-common/Wbuiltin-declaration-mismatch-1.c
parentf9f43fb3a83af7dc6b2f89d6691ccd33b0b90196 (diff)
downloadgcc-ff1ff960f5039cf1d2970bfe2ba965d1b994caf1.zip
gcc-ff1ff960f5039cf1d2970bfe2ba965d1b994caf1.tar.gz
gcc-ff1ff960f5039cf1d2970bfe2ba965d1b994caf1.tar.bz2
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
Diffstat (limited to 'gcc/testsuite/c-c++-common/Wbuiltin-declaration-mismatch-1.c')
-rw-r--r--gcc/testsuite/c-c++-common/Wbuiltin-declaration-mismatch-1.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/Wbuiltin-declaration-mismatch-1.c b/gcc/testsuite/c-c++-common/Wbuiltin-declaration-mismatch-1.c
new file mode 100644
index 0000000..63343b8
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wbuiltin-declaration-mismatch-1.c
@@ -0,0 +1,4 @@
+/* PR c++/82466 */
+/* { dg-options "-Wbuiltin-declaration-mismatch" } */
+
+int printf; /* { dg-warning "declared as non-function" } */