view gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-12.c @ 157:dafe684d005c

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:08:54 +0900
parents 1830386684a0
children
line wrap: on
line source

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