PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / format / diag-2.c
blobe7578d3f031e321eec9f046d0bb103ecd64655d6
1 /* Test for format diagnostics. Proper type names (bug 1027). */
2 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
3 /* { dg-do compile } */
4 /* { dg-options "-std=gnu99 -Wformat" } */
6 #include "format.h"
8 void
9 foo (double d)
11 printf ("%s", &d); /* { dg-warning "char \\*" "correct arg type" } */
12 scanf ("%zu", &d); /* { dg-warning "size_t \\*" "correct arg type" } */