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 \\\*." } */