From d228ac9ae52cc33ea572da89f325f8aeebd9eb32 Mon Sep 17 00:00:00 2001 From: Martin Sebor Date: Fri, 22 Feb 2019 16:21:07 +0000 Subject: [PATCH] Wbuiltin-declaration-mismatch-12.c: New test. gcc/testsuite/ChangeLog: * gcc.dg/Wbuiltin-declaration-mismatch-12.c: New test. From-SVN: r269120 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-12.c | 8 ++++++++ 2 files changed, 12 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-12.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5b2714478a2..cb653e3652a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2019-02-22 Martin Sebor + + * gcc.dg/Wbuiltin-declaration-mismatch-12.c: New test. + 2019-02-22 H.J. Lu Hongtao Liu Sunil K Pandey diff --git a/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-12.c b/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-12.c new file mode 100644 index 00000000000..6bf97623b8d --- /dev/null +++ b/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-12.c @@ -0,0 +1,8 @@ +/* Verify that declaring the __clear_cache and __builtin_prefetch + intrinsic functions with the wrong signature is diagnosed. + { dg-do compile } + { dg-options "-Wbuiltin-declaration-mismatch -Wextra" } */ + +extern void __clear_cache (char*, char*); /* { dg-warning "mismatch in argument 1 type of built-in function .__clear_cache.; expected .void \\\*." } */ + +void __builtin_prefetch (const char *, ...); /* { dg-warning "mismatch in argument 1 type of built-in function .__builtin_prefetch.; expected .const void \\\*." } */