exp = *expp;
tp = exp->ex_type;
if (oper == ARROW) {
- if (tp->tp_fund == POINTER) /* normal case */
+ if (tp->tp_fund == POINTER &&
+ ( tp->tp_up->tp_fund == STRUCT ||
+ tp->tp_up->tp_fund == UNION)) /* normal case */
tp = tp->tp_up;
else { /* constructions like "12->selector" and
"char c; c->selector"
sd = idf2sdef(idf, tp);
tp = sd->sd_stype;
break;
+ case POINTER:
+ break;
default:
expr_error(exp, "-> applied to %s",
symbol2str(tp->tp_fund));
exp->ex_type = error_type;
return;
}
- } /* tp->tp_fund != POINTER */
+ }
} /* oper == ARROW */
else { /* oper == '.' */
/* filter out illegal expressions "non_lvalue.sel" */
extern char options[];
extern arith NewLocal();
-char sp_occurred[SP_TOTAL]; /* indicate occurrence of special id */
+char sp_occurred[SP_TOTAL+1]; /* indicate occurrence of special id */
struct idf *idf_hashtable[HASHSIZE];
/* All identifiers can in principle be reached through