c-typeck.c (build_compound_expr, [...]): Don't try to use non_lvalue to stop something being a null pointer constant.
* c-typeck.c (build_compound_expr, build_c_cast): Don't try to use non_lvalue to stop something being a null pointer constant. From-SVN: r89120
This commit is contained in:
parent
d6b4201fab
commit
dee3cda5ba
2 changed files with 5 additions and 10 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-10-15 Joseph S. Myers <jsm@polyomino.org.uk>
|
||||
|
||||
* c-typeck.c (build_compound_expr, build_c_cast): Don't try to use
|
||||
non_lvalue to stop something being a null pointer constant.
|
||||
|
||||
2004-10-15 Aldy Hernandez <aldyh@redhat.com>
|
||||
|
||||
* config/rs6000/rs6000.h (FUNCTION_ARG_REGNO_P): FPRs are only
|
||||
|
|
|
@ -3054,10 +3054,6 @@ build_compound_expr (tree expr1, tree expr2)
|
|||
/* Convert arrays and functions to pointers. */
|
||||
expr2 = default_function_array_conversion (expr2);
|
||||
|
||||
/* Don't let (0, 0) be null pointer constant. */
|
||||
if (integer_zerop (expr2))
|
||||
expr2 = non_lvalue (expr2);
|
||||
|
||||
if (!TREE_SIDE_EFFECTS (expr1))
|
||||
{
|
||||
/* The left-hand operand of a comma expression is like an expression
|
||||
|
@ -3300,12 +3296,6 @@ build_c_cast (tree type, tree expr)
|
|||
}
|
||||
}
|
||||
|
||||
/* Don't let (void *) (FOO *) 0 be a null pointer constant. */
|
||||
if (TREE_CODE (value) == INTEGER_CST
|
||||
&& TREE_CODE (expr) == INTEGER_CST
|
||||
&& TREE_CODE (TREE_TYPE (expr)) != INTEGER_TYPE)
|
||||
value = non_lvalue (value);
|
||||
|
||||
/* Don't let a cast be an lvalue. */
|
||||
if (value == expr)
|
||||
value = non_lvalue (value);
|
||||
|
|
Loading…
Add table
Reference in a new issue