From ee71df465a068e0a22f346e2c8ee7bd6e3e96624 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Thu, 26 Nov 1992 22:40:09 +0000 Subject: [PATCH] (build_unary_op): Call pedantic_lvalue_warning for *all* cases of incrementing a cast. From-SVN: r2811 --- gcc/c-typeck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 1739805e96b..dfde12e5513 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -3011,6 +3011,7 @@ build_unary_op (code, xarg, noconvert) case FIX_FLOOR_EXPR: case FIX_ROUND_EXPR: case FIX_CEIL_EXPR: + pedantic_lvalue_warning (CONVERT_EXPR); /* If the real type has the same machine representation as the type it is cast to, we can make better output by adding directly to the inside of the cast. */ @@ -3022,7 +3023,6 @@ build_unary_op (code, xarg, noconvert) else { tree incremented, modify, value; - pedantic_lvalue_warning (CONVERT_EXPR); arg = stabilize_reference (arg); if (code == PREINCREMENT_EXPR || code == PREDECREMENT_EXPR) value = arg; -- 2.30.2