diff options
author | Richard Henderson <rth@redhat.com> | 2000-12-05 00:16:15 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2000-12-05 00:16:15 -0800 |
commit | eca93b05990a8a50236ea4a78959a39e0c94e04b (patch) | |
tree | 4bfd9a9100a0110ce7150d1fd392cd3496327a46 /gcc/stmt.c | |
parent | 7d3615831e1495c3181b108a3dd510382a997abc (diff) | |
download | gcc-eca93b05990a8a50236ea4a78959a39e0c94e04b.zip gcc-eca93b05990a8a50236ea4a78959a39e0c94e04b.tar.gz gcc-eca93b05990a8a50236ea4a78959a39e0c94e04b.tar.bz2 |
* stmt.c (warn_if_unused_value): Move side effects test earlier.
From-SVN: r38030
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r-- | gcc/stmt.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1983,6 +1983,10 @@ warn_if_unused_value (exp) if (VOID_TYPE_P (TREE_TYPE (exp))) return 0; + /* If this is an expression with side effects, don't warn. */ + if (TREE_SIDE_EFFECTS (exp)) + return 0; + switch (TREE_CODE (exp)) { case PREINCREMENT_EXPR: @@ -2058,10 +2062,6 @@ warn_if_unused_value (exp) && TREE_THIS_VOLATILE (exp)) return 0; - /* If this is an expression with side effects, don't warn. */ - if (TREE_SIDE_EFFECTS (exp)) - return 0; - /* If this is an expression which has no operands, there is no value to be unused. There are no such language-independent codes, but front ends may define such. */ |