diff options
author | Mark Mitchell <mark@codesourcery.com> | 2003-09-04 07:16:43 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2003-09-04 07:16:43 +0000 |
commit | d18a825116b013ed02847c1a2247fa9cec1364cf (patch) | |
tree | 5bb40582c760ac444032db79c71b9f81c183e39e /gcc/doc | |
parent | c5ef564bebaa4e7abb41636a565e43ddbeb268a6 (diff) | |
download | gcc-d18a825116b013ed02847c1a2247fa9cec1364cf.zip gcc-d18a825116b013ed02847c1a2247fa9cec1364cf.tar.gz gcc-d18a825116b013ed02847c1a2247fa9cec1364cf.tar.bz2 |
Remove cast-as-lvalue extension.
* call.c (build_conditional_expr): Correct formatting.
(convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
(initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
* cp-tree.h (non_cast_lvalue_p): Remove.
(real_non_cast_lvalue_p): Remove.
(non_cast_lvalue_or_else): Remove.
* tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
(real_lvalue_p): Adjust call to lvalue_p_1.
(non_cast_lvalue_p): Remove.
(non_cast_lvalue_or_else): Remove.
(lvalue_p): Adjust call to lvalue_p_1.
(lvalue_or_else): Simplify.
* typeck.c (build_unary_op): Use lvalue_or_else, not
non_cast_lvalue_or_else.
(build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
* doc/extend.texi: Document removal of cast-as-lvalue extension in
C++.
* g++.dg/expr/lval1.C: New test.
* g++.dg/ext/lvcast.C: Remove.
From-SVN: r71051
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/extend.texi | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 0edf2cf..6664e1c 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -1071,9 +1071,9 @@ Compound expressions, conditional expressions and casts are allowed as lvalues provided their operands are lvalues. This means that you can take their addresses or store values into them. -Standard C++ allows compound expressions and conditional expressions as -lvalues, and permits casts to reference type, so use of this extension -is deprecated for C++ code. +Standard C++ allows compound expressions and conditional expressions +as lvalues, and permits casts to reference type, so use of this +extension is not supported for C++ code. For example, a compound expression can be assigned, provided the last expression in the sequence is an lvalue. These two expressions are |