aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index cc743cc..b729fd8 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -2365,7 +2365,9 @@ c_common_truthvalue_conversion (tree expr)
break;
case MODIFY_EXPR:
- if (warn_parentheses && C_EXP_ORIGINAL_CODE (expr) == MODIFY_EXPR)
+ if (warn_parentheses
+ && C_EXP_ORIGINAL_CODE (expr) == MODIFY_EXPR
+ && !TREE_NO_WARNING (expr))
warning ("suggest parentheses around assignment used as truth value");
break;