summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/Wwrite-strings-1.c
blob: 03bb4094104fd799523ef2c1dfc06f673fd9df77 (plain)
1
2
3
4
5
6
7
8
/* Test pointer initialization and dereference don't lose qualifiers
   on array types.  This test wrongly failed to diagnose the loss of
   const.  */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
/* { dg-options "-Wwrite-strings" } */
typedef char T[1];
T *p = &""; /* { dg-warning "initialization from incompatible pointer type" } */