1 2 3 4 5 6 7 8 9 10 11 12 13 14
// { dg-do assemble } // { dg-options "-Wall -Wno-int-to-pointer-cast" } typedef char * charptr; typedef __SIZE_TYPE__ size_t; char c[]={'A','B','C','D'}; int i=size_t(&c); int *pp=&i; void foo() { } int main() { charptr(*pp)++; // { dg-error "lvalue" } return 0; }