1 // PR 35711 2 // { dg-do compile } 3 // { dg-options "-Wcast-qual" } 4 foo(volatile int * p)5 int* foo (volatile int *p) 6 { 7 return (int*)p; // { dg-warning "cast from type 'volatile int\\*' to type 'int\\*' casts away qualifiers" } 8 } 9