if (!issue || warnmsg == NULL)
return;
- if (gimple_no_warning_p (stmt))
+ if (warning_suppressed_p (stmt, OPT_Wstrict_overflow))
return;
/* Use the smallest code level when deciding to issue the
tree ret = build2_loc (loc, code, type, TREE_OPERAND (arg, 0),
TREE_OPERAND (arg, 1));
- if (TREE_NO_WARNING (arg))
- TREE_NO_WARNING (ret) = 1;
+ copy_warning (ret, arg);
return ret;
}
tem = fold_build1_loc (loc, code, type, TREE_OPERAND (op0, 1));
/* First do the assignment, then return converted constant. */
tem = build2_loc (loc, COMPOUND_EXPR, TREE_TYPE (tem), op0, tem);
- TREE_NO_WARNING (tem) = 1;
+ suppress_warning (tem /* What warning? */);
TREE_USED (tem) = 1;
return tem;
}
TYPE_CACHED_VALUES (tmp) = NULL;
}
}
- else if (TREE_NO_WARNING (expr) && (DECL_P (expr) || EXPR_P (expr)))
+ else if (warning_suppressed_p (expr) && (DECL_P (expr) || EXPR_P (expr)))
{
- /* Allow TREE_NO_WARNING to be set. Perhaps we shouldn't allow that
- and change builtins.c etc. instead - see PR89543. */
+ /* Allow the no-warning bit to be set. Perhaps we shouldn't allow
+ that and change builtins.c etc. instead - see PR89543. */
size_t sz = tree_size (expr);
buf = XALLOCAVAR (union tree_node, sz);
memcpy ((char *) buf, expr, sz);