handle intorcard_type better in case statements

This commit is contained in:
ceriel
1988-11-29 13:13:03 +00:00
parent 17e744b5e0
commit 7e4969064c
4 changed files with 26 additions and 6 deletions

View File

@@ -400,7 +400,11 @@ CaseLabels(t_type **ptp; register t_node **pnd;)
}:
ConstExpression(pnd)
{
if (*ptp != 0 && ChkCompat(pnd, *ptp, "case label")) {
if (*ptp != 0) {
t_type *tp = intorcard(*ptp,
BaseType((*pnd)->nd_type), 0);
if (tp) *ptp = tp;
ChkCompat(pnd, *ptp, "case label");
}
nd = *pnd;
nd->nd_type = BaseType(nd->nd_type); /* ??? */