Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.dg / format / cast-1.c
blob78a4f527d9baf03fc67796b6ee413038eb4415f7
1 /* Test for strings cast through integer types: should not be treated
2 as format strings unless the types are of the same width as
3 pointers (intptr_t or similar). */
4 /* Origin: Joseph Myers <joseph@codesourcery.com> */
5 /* { dg-do compile } */
6 /* { dg-options "-Wformat" } */
8 #include "format.h"
10 void
11 f (int x)
13 printf("%s", x); /* { dg-warning "format" } */
14 printf((char *)(size_t)"%s", x); /* { dg-warning "format" } */
15 printf((char *)(char)"%s", x);