Valid-label
Validate a label.
- Signature
(valid-label label table ienv)
→
(mv erp new-label return-types new-table)
- Arguments
- label — Guard (labelp label).
- table — Guard (valid-tablep table).
- ienv — Guard (ienvp ienv).
- Returns
- new-label — Type (labelp new-label).
- return-types — Type (type-setp return-types).
- new-table — Type (valid-tablep new-table).
For now this just amounts to validating the constant expression(s),
for the case of a case label,
and ensuring it/they has/have integer type [C:6.8.4.2/3];
in the future, we should collect labels in the validation table
so that we can check that referenced labels are in scope.
Also, for now we do not check that case and default labels
only appear in switch statements [C:6.8.1/2].