case '5': case '6': case '7': case '8': case '9':
if (TREE_STRING_POINTER (TREE_PURPOSE (tail))[j]
>= '0' + noutputs)
- error ("matching constraint references invalid operand number");
+ {
+ error
+ ("matching constraint references invalid operand number");
+ return;
+ }
/* ... fall through ... */
continue;
}
- /* Ignore unknown register, error already signalled. */
+ /* Ignore unknown register, error already signaled. */
continue;
}
/* Arrange for the top element of the dynamic handler chain to be
popped if we exit the current binding contour. DECL is the
- assciated declaration, if any, otherwise NULL_TREE. If the current
+ associated declaration, if any, otherwise NULL_TREE. If the current
contour is left via an exception, then __sjthrow will pop the top
element off the dynamic handler chain. The code that avoids doing
the action we push into the handler chain in the exceptional case
context, so that any cleanup actions we register with
expand_decl_init will be properly conditionalized when those
cleanup actions are later performed. Must be called before any
- expression (tree) is expanded that is within a contidional context. */
+ expression (tree) is expanded that is within a conditional context. */
void
-start_cleanup_deferal ()
+start_cleanup_deferral ()
{
/* block_stack can be NULL if we are inside the parameter list. It is
OK to do nothing, because cleanups aren't possible here. */
}
/* Mark the end of a conditional region of code. Because cleanup
- deferals may be nested, we may still be in a conditional region
+ deferrals may be nested, we may still be in a conditional region
after we end the currently deferred cleanups, only after we end all
deferred cleanups, are we back in unconditional code. */
void
-end_cleanup_deferal ()
+end_cleanup_deferral ()
{
/* block_stack can be NULL if we are inside the parameter list. It is
OK to do nothing, because cleanups aren't possible here. */
thiscase->data.case_stmt.start = get_last_insn ();
- start_cleanup_deferal ();
+ start_cleanup_deferral ();
}
thiscase->data.case_stmt.num_ranges = 0;
case_stack = thiscase;
nesting_stack = thiscase;
- start_cleanup_deferal ();
+ start_cleanup_deferral ();
}
/* End a dummy case statement. */
void
expand_end_case_dummy ()
{
- end_cleanup_deferal ();
+ end_cleanup_deferral ();
POPSTACK (case_stack);
}
return 0;
}
-/* Like pushcase but this case applies to all values
- between VALUE1 and VALUE2 (inclusive).
- The return value is the same as that of pushcase
- but there is one additional error code:
- 4 means the specified range was empty. */
+/* Like pushcase but this case applies to all values between VALUE1 and
+ VALUE2 (inclusive). If VALUE1 is NULL, the range starts at the lowest
+ value of the index type and ends at VALUE2. If VALUE2 is NULL, the range
+ starts at VALUE1 and ends at the highest value of the index type.
+ If both are NULL, this case applies to all values.
+
+ The return value is the same as that of pushcase but there is one
+ additional error code: 4 means the specified range was empty. */
int
pushcase_range (value1, value2, converter, label, duplicate)
if (! (case_stack && case_stack->data.case_stmt.start))
return 1;
- /* Fail if the range is empty. */
- if (tree_int_cst_lt (value2, value1))
- return 4;
-
if (stack_block_stack
&& stack_block_stack->depth > case_stack->depth)
return 5;
}
case_stack->data.case_stmt.seenlabel = 1;
- /* Convert VALUEs to type in which the comparisons are nominally done. */
- if (value1 == 0) /* Negative infinity. */
+ /* Convert VALUEs to type in which the comparisons are nominally done
+ and replace any unspecified value with the corresponding bound. */
+ if (value1 == 0)
value1 = TYPE_MIN_VALUE (index_type);
- value1 = (*converter) (nominal_type, value1);
-
- if (value2 == 0) /* Positive infinity. */
+ if (value2 == 0)
value2 = TYPE_MAX_VALUE (index_type);
+
+ /* Fail if the range is empty. Do this before any conversion since
+ we want to allow out-of-range empty ranges. */
+ if (tree_int_cst_lt (value2, value1))
+ return 4;
+
+ value1 = (*converter) (nominal_type, value1);
value2 = (*converter) (nominal_type, value2);
/* Fail if these values are out of range. */
- if (! int_fits_type_p (value1, index_type))
+ if (TREE_CONSTANT_OVERFLOW (value1)
+ || ! int_fits_type_p (value1, index_type))
return 3;
- if (! int_fits_type_p (value2, index_type))
+ if (TREE_CONSTANT_OVERFLOW (value2)
+ || ! int_fits_type_p (value2, index_type))
return 3;
return add_case_node (value1, value2, label, duplicate);
if (count != 0)
range = fold (build (MINUS_EXPR, index_type, maxval, minval));
- end_cleanup_deferal ();
+ end_cleanup_deferral ();
if (count == 0)
{
thiscase->data.case_stmt.start);
}
else
- end_cleanup_deferal ();
+ end_cleanup_deferral ();
if (thiscase->exit_label)
emit_label (thiscase->exit_label);