summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/Wredundant-decls-1.c
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-25 03:58:50 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-25 03:58:50 +0000
commit18eb56cdf26fccfc3495a6e474e3c82f3fcfd9cf (patch)
treee08d5c38fdbe7459662ce1f4849c678ef281f3ec /gcc/testsuite/gcc.dg/Wredundant-decls-1.c
parent64f7853c5c422af1f923f0164686418254a59c58 (diff)
downloadgcc-18eb56cdf26fccfc3495a6e474e3c82f3fcfd9cf.tar.gz
2004-07-24 Alexander Kabaev <kan@freebsd.org>
Zack Weinberg <zack@codesourcery.com PR 16684 * c-decl.c (diagnose_mismatched_decls): Don't issue a redundant-declaration warning the first time a builtin is declared explicitly. testsuite: * gcc.dg/Wredundant-decls-1.c: New test case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85140 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/Wredundant-decls-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/Wredundant-decls-1.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/Wredundant-decls-1.c b/gcc/testsuite/gcc.dg/Wredundant-decls-1.c
new file mode 100644
index 00000000000..c38c7b5540f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wredundant-decls-1.c
@@ -0,0 +1,7 @@
+/* PR 16684: no redundant declaration warnings should issue the first
+ time a built-in function is declared.
+ { dg-do compile }
+ { dg-options "-Wredundant-decls" } */
+
+void *malloc (__SIZE_TYPE__); /* { dg-bogus "redundant" } */
+void *malloc (__SIZE_TYPE__); /* { dg-warning "redundant" } */