OSDN Git Service

* tree-def (WITH_SIZE_EXPR): New.
[pf3gnuchains/gcc-fork.git] / gcc / c-typeck.c
index ca2e6df..2495550 100644 (file)
@@ -2303,7 +2303,8 @@ build_unary_op (enum tree_code code, tree xarg, int flag)
         is enough to prevent anybody from looking inside for
         associativity, but won't generate any code.  */
       if (!(typecode == INTEGER_TYPE || typecode == REAL_TYPE
-           || typecode == COMPLEX_TYPE))
+           || typecode == COMPLEX_TYPE
+           || typecode == VECTOR_TYPE))
        {
          error ("wrong type argument to unary plus");
          return error_mark_node;
@@ -6581,7 +6582,7 @@ emit_side_effect_warnings (tree expr)
     {
       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);