(recursively) all of the component statements should already have
line numbers assigned. ??? Can we discard no-op statements
earlier? */
- if (CAN_HAVE_LOCATION_P (stmt)
- && EXPR_LOCATION (stmt) == UNKNOWN_LOCATION)
- SET_EXPR_LOCATION (stmt, loc);
+ if (EXPR_LOCATION (stmt) == UNKNOWN_LOCATION)
+ protected_set_expr_location (stmt, loc);
parser->in_if_block = in_if_block;
}
/* Attempt to statically determine when the number isn't positive. */
c = fold_build2_loc (expr_loc, LE_EXPR, boolean_type_node, t,
build_int_cst (TREE_TYPE (t), 0));
- if (CAN_HAVE_LOCATION_P (c))
- SET_EXPR_LOCATION (c, expr_loc);
+ protected_set_expr_location (c, expr_loc);
if (c == boolean_true_node)
{
warning_at (expr_loc, 0,
/* Attempt to statically determine when the number isn't positive. */
c = fold_build2_loc (expr_loc, LE_EXPR, boolean_type_node, t,
build_int_cst (TREE_TYPE (t), 0));
- if (CAN_HAVE_LOCATION_P (c))
- SET_EXPR_LOCATION (c, expr_loc);
+ protected_set_expr_location (c, expr_loc);
if (c == boolean_true_node)
{
warning_at (expr_loc, 0,
/* Attempt to statically determine when the number isn't positive. */
c = fold_build2_loc (expr_loc, LE_EXPR, boolean_type_node, t,
build_int_cst (TREE_TYPE (t), 0));
- if (CAN_HAVE_LOCATION_P (c))
- SET_EXPR_LOCATION (c, expr_loc);
+ protected_set_expr_location (c, expr_loc);
if (c == boolean_true_node)
{
warning_at (expr_loc, 0,
/* Attempt to statically determine when the number isn't positive. */
c = fold_build2_loc (expr_loc, LE_EXPR, boolean_type_node, t,
build_int_cst (TREE_TYPE (t), 0));
- if (CAN_HAVE_LOCATION_P (c))
- SET_EXPR_LOCATION (c, expr_loc);
+ protected_set_expr_location (c, expr_loc);
if (c == boolean_true_node)
{
warning_at (expr_loc, 0,
/* Attempt to statically determine when the number isn't positive. */
c = fold_build2_loc (expr_loc, LE_EXPR, boolean_type_node, t,
build_int_cst (TREE_TYPE (t), 0));
- if (CAN_HAVE_LOCATION_P (c))
- SET_EXPR_LOCATION (c, expr_loc);
+ protected_set_expr_location (c, expr_loc);
if (c == boolean_true_node)
{
warning_at (expr_loc, 0, "%<num_teams%> value must be positive");
/* Attempt to statically determine when the number isn't positive. */
c = fold_build2_loc (expr_loc, LE_EXPR, boolean_type_node, t,
build_int_cst (TREE_TYPE (t), 0));
- if (CAN_HAVE_LOCATION_P (c))
- SET_EXPR_LOCATION (c, expr_loc);
+ protected_set_expr_location (c, expr_loc);
if (c == boolean_true_node)
{
warning_at (expr_loc, 0, "%<thread_limit%> value must be positive");
|| TREE_CODE (expr) == COMPLEX_CST)))
value = build1 (NOP_EXPR, type, value);
- if (CAN_HAVE_LOCATION_P (value))
- SET_EXPR_LOCATION (value, loc);
+ protected_set_expr_location (value, loc);
return value;
}
SET_EXPR_LOCATION (ret, loc);
}
- if (CAN_HAVE_LOCATION_P (ret) && !EXPR_HAS_LOCATION (ret))
- SET_EXPR_LOCATION (ret, loc);
+ if (!EXPR_HAS_LOCATION (ret))
+ protected_set_expr_location (ret, loc);
/* C++ does not permits types to be defined in a cast, but it
allows references to incomplete types. */