aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family/c-warn.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-family/c-warn.c')
-rw-r--r--gcc/c-family/c-warn.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/c-family/c-warn.c b/gcc/c-family/c-warn.c
index 9315cac..f6b3afc 100644
--- a/gcc/c-family/c-warn.c
+++ b/gcc/c-family/c-warn.c
@@ -1359,6 +1359,11 @@ warnings_for_convert_and_check (location_t loc, tree type, tree expr,
{
loc = expansion_point_location_if_in_system_header (loc);
+ while (TREE_CODE (expr) == COMPOUND_EXPR)
+ expr = TREE_OPERAND (expr, 1);
+ while (TREE_CODE (result) == COMPOUND_EXPR)
+ result = TREE_OPERAND (result, 1);
+
bool cst = TREE_CODE_CLASS (TREE_CODE (result)) == tcc_constant;
tree exprtype = TREE_TYPE (expr);