* c-typeck.c (emit_side_effect_warnings): Use EXPR_HAS_LOCATION
instead of EXPR_LOCUS in a boolean context, which is always true
if --enable-mapped-location.
* stmt.c (warn_if_unused_value): Likewise. Also use EXPR_LOCATION.
From-SVN: r84698
+2004-07-14 Per Bothner <per@bothner.com>
+
+ * c-typeck.c (emit_side_effect_warnings): Use EXPR_HAS_LOCATION
+ instead of EXPR_LOCUS in a boolean context, which is always true
+ if --enable-mapped-location.
+ * stmt.c (warn_if_unused_value): Likewise. Also use EXPR_LOCATION.
+
2004-07-14 Richard Henderson <rth@redhat.com>
* dominance.c (struct dom_info): Add fake_exit_edge.
{
if (!VOID_TYPE_P (TREE_TYPE (expr)) && !TREE_NO_WARNING (expr))
warning ("%Hstatement with no effect",
- EXPR_LOCUS (expr) ? EXPR_LOCUS (expr) : &input_location);
+ EXPR_HAS_LOCATION (expr) ? EXPR_LOCUS (expr) : &input_location);
}
else if (warn_unused_value)
warn_if_unused_value (expr, input_location);
if (VOID_TYPE_P (TREE_TYPE (exp)))
return 0;
- if (EXPR_LOCUS (exp))
- locus = *EXPR_LOCUS (exp);
+ if (EXPR_HAS_LOCATION (exp))
+ locus = EXPR_LOCATION (exp);
switch (TREE_CODE (exp))
{