Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / Wbuiltin-declaration-mismatch.c
blobed66fd3626b9874e19cc933e1dc4a5a19803dcbe
1 /* PR c/83656 - missing -Wbuiltin-declaration-mismatch on declaration
2 without prototype
3 { dg-do compile }
4 { dg-options "-Wall" } */
6 typedef __SIZE_TYPE__ size_t;
8 /* Verify that ordinary library built-ins are not diagnosed with -Wall
9 (or by default) whether or not they take arguments (even though they
10 should be). */
12 void abort ();
13 void* memcpy ();
14 void* memset ();
15 size_t strlen ();
17 /* Verify mismatches in return types are diagnosed. */
18 int exit (); /* { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" } */
20 /* Variadic built-ins are diagnosed with -Wall (they are, in fact,
21 diagnosed by default). */
22 int printf (); /* { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" } */
23 int sprintf (); /* { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" } */