2014-07-29 Ed Smith-Rowland <3dw4rd@verizon.net>
[official-gcc.git] / gcc / testsuite / gcc.dg / Wwrite-strings-1.c
blob03bb4094104fd799523ef2c1dfc06f673fd9df77
1 /* Test pointer initialization and dereference don't lose qualifiers
2 on array types. This test wrongly failed to diagnose the loss of
3 const. */
4 /* Origin: Joseph Myers <joseph@codesourcery.com> */
5 /* { dg-do compile } */
6 /* { dg-options "-Wwrite-strings" } */
7 typedef char T[1];
8 T *p = &""; /* { dg-warning "initialization from incompatible pointer type" } */