diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/compound-lvalue-1.c')
| -rw-r--r-- | gcc/testsuite/gcc.dg/compound-lvalue-1.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/compound-lvalue-1.c b/gcc/testsuite/gcc.dg/compound-lvalue-1.c new file mode 100644 index 00000000000..c77403d02e3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/compound-lvalue-1.c @@ -0,0 +1,12 @@ +/* Test for deprecation of compound expressions as lvalues. */ +/* Origin: Joseph Myers <jsm@polyomino.org.uk> */ +/* { dg-do compile } */ +/* { dg-options "" } */ + +int x, y; + +void +foo (void) +{ + (x, y) = 1; /* { dg-warning "lvalue" "compound expression as lvalue deprecated" } */ +} |

