Commit e6b5a630 by Richard Henderson Committed by Richard Henderson

c-typeck.c (emit_side_effect_warnings): Ignore error marks.

        * c-typeck.c (emit_side_effect_warnings): Ignore error marks.
        (c_finish_stmt_expr): Likewise.

From-SVN: r83534
parent 0397ac35
2004-06-22 Richard Henderson <rth@redhat.com> 2004-06-22 Richard Henderson <rth@redhat.com>
* c-typeck.c (emit_side_effect_warnings): Ignore error marks.
(c_finish_stmt_expr): Likewise.
* config/i386/i386.c (TARGET_STRUCT_VALUE_RTX): New. * config/i386/i386.c (TARGET_STRUCT_VALUE_RTX): New.
(ix86_return_in_memory): Move SSE vector return warning ... (ix86_return_in_memory): Move SSE vector return warning ...
(ix86_struct_value_rtx): ... here. New. (ix86_struct_value_rtx): ... here. New.
......
...@@ -6651,7 +6651,9 @@ c_finish_for_stmt (tree body, tree for_stmt) ...@@ -6651,7 +6651,9 @@ c_finish_for_stmt (tree body, tree for_stmt)
static void static void
emit_side_effect_warnings (tree expr) emit_side_effect_warnings (tree expr)
{ {
if (!TREE_SIDE_EFFECTS (expr)) if (expr == error_mark_node)
;
else if (!TREE_SIDE_EFFECTS (expr))
{ {
if (!VOID_TYPE_P (TREE_TYPE (expr)) && !TREE_NO_WARNING (expr)) if (!VOID_TYPE_P (TREE_TYPE (expr)) && !TREE_NO_WARNING (expr))
warning ("%Hstatement with no effect", warning ("%Hstatement with no effect",
...@@ -6766,7 +6768,9 @@ c_finish_stmt_expr (tree body) ...@@ -6766,7 +6768,9 @@ c_finish_stmt_expr (tree body)
/* In the case that the BIND_EXPR is not necessary, return the /* In the case that the BIND_EXPR is not necessary, return the
expression out from inside it. */ expression out from inside it. */
if (last == BIND_EXPR_BODY (body) && BIND_EXPR_VARS (body) == NULL) if (last == error_mark_node
|| (last == BIND_EXPR_BODY (body)
&& BIND_EXPR_VARS (body) == NULL))
return last; return last;
/* Extract the type of said expression. */ /* Extract the type of said expression. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment