if (TREE_CODE_CLASS (code1) == '<' || TREE_CODE_CLASS (code2) == '<')
warning ("suggest parentheses around comparison in operand of &");
}
- }
+ /* Similarly, check for cases like 1<=i<=10 that are probably errors. */
+ if (TREE_CODE_CLASS (code) == '<'
+ && (TREE_CODE_CLASS (code1) == '<'
+ || TREE_CODE_CLASS (code2) == '<'))
+ warning ("comparisons like X<=Y<=Z do not have their mathematical meaning");
- /* Similarly, check for cases like 1<=i<=10 that are probably errors. */
- if (TREE_CODE_CLASS (code) == '<' && extra_warnings
- && (TREE_CODE_CLASS (code1) == '<' || TREE_CODE_CLASS (code2) == '<'))
- warning ("comparisons like X<=Y<=Z do not have their mathematical meaning");
+ }
unsigned_conversion_warning (result, arg1);
unsigned_conversion_warning (result, arg2);
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;
}
return args;
}
-
-/* Expand an ASM statement with operands, handling output operands
- that are not variables or INDIRECT_REFS by transforming such
- cases into cases that expand_asm_operands can handle.
-
- Arguments are same as for expand_asm_operands. */
-
-void
-c_expand_asm_operands (tree string, tree outputs, tree inputs,
- tree clobbers, int vol, location_t locus)
-{
- int noutputs = list_length (outputs);
- int i;
- /* o[I] is the place that output number I should be written. */
- tree *o = alloca (noutputs * sizeof (tree));
- tree tail;
-
- /* Record the contents of OUTPUTS before it is modified. */
- for (i = 0, tail = outputs; tail; tail = TREE_CHAIN (tail), i++)
- {
- o[i] = TREE_VALUE (tail);
- if (o[i] == error_mark_node)
- return;
- }
-
- /* Generate the ASM_OPERANDS insn; store into the TREE_VALUEs of
- OUTPUTS some trees for where the values were actually stored. */
- expand_asm_operands (string, outputs, inputs, clobbers, vol, locus);
-
- /* Copy all the intermediate outputs into the specified outputs. */
- for (i = 0, tail = outputs; tail; tail = TREE_CHAIN (tail), i++)
- {
- if (o[i] != TREE_VALUE (tail))
- {
- expand_expr (build_modify_expr (o[i], NOP_EXPR, TREE_VALUE (tail)),
- NULL_RTX, VOIDmode, EXPAND_NORMAL);
- free_temp_slots ();
-
- /* Restore the original value so that it's correct the next
- time we expand this function. */
- TREE_VALUE (tail) = o[i];
- }
- /* Detect modification of read-only values.
- (Otherwise done by build_modify_expr.) */
- else
- {
- tree type = TREE_TYPE (o[i]);
- if (TREE_READONLY (o[i])
- || TYPE_READONLY (type)
- || ((TREE_CODE (type) == RECORD_TYPE
- || TREE_CODE (type) == UNION_TYPE)
- && C_TYPE_FIELDS_READONLY (type)))
- readonly_error (o[i], "modification by `asm'");
- }
- }
-
- /* Those MODIFY_EXPRs could do autoincrements. */
- emit_queue ();
-}
\f
/* Generate a goto statement to LABEL. */
{
tree entry = NULL, exit = NULL, t;
- /* Force zeros to NULL so that we don't test them. */
- if (cond && integer_zerop (cond))
- cond = NULL;
-
/* Detect do { ... } while (0) and don't generate loop construct. */
+ if (cond && !cond_is_first && integer_zerop (cond))
+ cond = NULL;
if (cond_is_first || cond)
{
tree top = build1 (LABEL_EXPR, void_type_node, NULL_TREE);
{
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);