aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2004-06-22 19:33:25 -0700
committerRichard Henderson <rth@gcc.gnu.org>2004-06-22 19:33:25 -0700
commite6b5a630376f3fc1e82a4e6d564b397b8ce13be7 (patch)
treee0891ad5e5c581512ec7f328fe803532709174ae
parent0397ac35755f5edc409010579811e9101f86ab2c (diff)
downloadgcc-e6b5a630376f3fc1e82a4e6d564b397b8ce13be7.zip
gcc-e6b5a630376f3fc1e82a4e6d564b397b8ce13be7.tar.gz
gcc-e6b5a630376f3fc1e82a4e6d564b397b8ce13be7.tar.bz2
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
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/c-typeck.c8
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 526a8ec..ecd0f06 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
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.
(ix86_return_in_memory): Move SSE vector return warning ...
(ix86_struct_value_rtx): ... here. New.
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 63c9121..beef504 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -6651,7 +6651,9 @@ c_finish_for_stmt (tree body, tree for_stmt)
static void
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))
warning ("%Hstatement with no effect",
@@ -6766,7 +6768,9 @@ c_finish_stmt_expr (tree body)
/* In the case that the BIND_EXPR is not necessary, return the
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;
/* Extract the type of said expression. */