Debian Codegraph @

gcc/testsuite/g++.dg/ext/lvalue1.C

raw
1 // Test that we complain about the gcc cast-as-lvalue extension.
2
3 int main ()
4 {
5 char c;
6
7 static_cast<int>(c) = 2; // { dg-error "3:lvalue" "not an lvalue" }
8
9 return c != 2;
10 }