diff options
author | Joseph Myers <jsm@polyomino.org.uk> | 2003-11-08 01:38:48 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2003-11-08 01:38:48 +0000 |
commit | 30321c396e258cd2ed96e93b28a2ccd5b294b56f (patch) | |
tree | 71ae503dfdc2ce26ed49c67a3d879c3fde5850ab /gcc/testsuite/gcc.dg/compound-lvalue-1.c | |
parent | 9b574a7758dc0eca42ec9531aec9970215c536fc (diff) | |
download | gcc-30321c396e258cd2ed96e93b28a2ccd5b294b56f.zip gcc-30321c396e258cd2ed96e93b28a2ccd5b294b56f.tar.gz gcc-30321c396e258cd2ed96e93b28a2ccd5b294b56f.tar.bz2 |
c-typeck.c (pedantic_lvalue_warning): Deprecate compound expressions as lvalues.
* c-typeck.c (pedantic_lvalue_warning): Deprecate compound
expressions as lvalues.
(internal_build_compound_expr): Remove special handling for
non-pedantic case.
* doc/extend.texi: Document that all extended lvalues are now
deprecated.
testsuite:
* gcc.dg/compound-lvalue-1.c: New test.
* gcc.dg/c90-const-expr-2.c, gcc.dg/c99-const-expr-2.c: Remove
some XFAILs.
From-SVN: r73352
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 0000000..c77403d --- /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" } */ +} |