From: Jason Merrill Date: Thu, 16 Jun 1994 00:47:03 +0000 (+0000) Subject: (warn_if_unused_value): Handle TREE_NO_UNUSED_WARNING for X-Git-Tag: misc/cutover-egcs-0~6443 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a646a21183d4be03dc046bbe6761af1a379e02d1;p=thirdparty%2Fgcc.git (warn_if_unused_value): Handle TREE_NO_UNUSED_WARNING for COMPOUND_EXPRs, too. From-SVN: r7500 --- diff --git a/gcc/stmt.c b/gcc/stmt.c index acaa436cacff..d74418c251d6 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -1697,6 +1697,8 @@ warn_if_unused_value (exp) return warn_if_unused_value (TREE_OPERAND (exp, 1)); case COMPOUND_EXPR: + if (TREE_NO_UNUSED_WARNING (exp)) + return 0; if (warn_if_unused_value (TREE_OPERAND (exp, 0))) return 1; /* Let people do `(foo (), 0)' without a warning. */