From: Martin Sebor Date: Fri, 22 Feb 2019 16:21:07 +0000 (+0000) Subject: Wbuiltin-declaration-mismatch-12.c: New test. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d228ac9ae52cc33ea572da89f325f8aeebd9eb32;p=gcc.git Wbuiltin-declaration-mismatch-12.c: New test. gcc/testsuite/ChangeLog: * gcc.dg/Wbuiltin-declaration-mismatch-12.c: New test. From-SVN: r269120 --- 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 \\\*." } */