+2014-10-07 Marek Polacek <polacek@redhat.com>
+
+ * c-convert.c (convert): Use error_operand_p.
+ * c-typeck.c (require_complete_type): Likewise.
+ (really_atomic_lvalue): Likewise.
+ (digest_init): Likewise.
+ (handle_omp_array_sections_1): Likewise.
+
2014-10-03 Marek Polacek <polacek@redhat.com>
PR c/63453
location_t loc = EXPR_LOCATION (expr);
if (type == error_mark_node
- || expr == error_mark_node
- || TREE_TYPE (expr) == error_mark_node)
+ || error_operand_p (expr))
return error_mark_node;
if ((invalid_conv_diag
{
tree type = TREE_TYPE (value);
- if (value == error_mark_node || type == error_mark_node)
+ if (error_operand_p (value))
return error_mark_node;
/* First, detect a valid value with a complete type. */
static bool
really_atomic_lvalue (tree expr)
{
- if (expr == error_mark_node || TREE_TYPE (expr) == error_mark_node)
+ if (error_operand_p (expr))
return false;
if (!TYPE_ATOMIC (TREE_TYPE (expr)))
return false;
if (type == error_mark_node
|| !init
- || init == error_mark_node
- || TREE_TYPE (init) == error_mark_node)
+ || error_operand_p (init))
return error_mark_node;
STRIP_TYPE_NOPS (inside_init);
tree ret, low_bound, length, type;
if (TREE_CODE (t) != TREE_LIST)
{
- if (t == error_mark_node || TREE_TYPE (t) == error_mark_node)
+ if (error_operand_p (t))
return error_mark_node;
if (TREE_CODE (t) != VAR_DECL && TREE_CODE (t) != PARM_DECL)
{