OSDN Git Service

* c-typeck.c (pedantic_lvalue_warning): Deprecate compound
[pf3gnuchains/gcc-fork.git] / gcc / c-typeck.c
index 81eee37..fc6dc59 100644 (file)
@@ -2591,8 +2591,7 @@ pedantic_lvalue_warning (enum tree_code code)
       pedwarn ("use of conditional expressions as lvalues is deprecated");
       break;
     case COMPOUND_EXPR:
-      if (pedantic)
-       pedwarn ("ISO C forbids use of compound expressions as lvalues");
+      pedwarn ("use of compound expressions as lvalues is deprecated");
       break;
     default:
       pedwarn ("use of cast expressions as lvalues is deprecated");
@@ -2903,11 +2902,6 @@ internal_build_compound_expr (tree list, int first_p)
            && ! (TREE_CODE (TREE_VALUE (list)) == CONVERT_EXPR
                 && VOID_TYPE_P (TREE_TYPE (TREE_VALUE (list)))))
         warning ("left-hand operand of comma expression has no effect");
-
-      /* When pedantic, a compound expression can be neither an lvalue
-         nor an integer constant expression.  */
-      if (! pedantic)
-        return rest;
     }
 
   /* With -Wunused, we should also warn if the left-hand operand does have