fixed unary & and indirect calls

This commit is contained in:
eck
1989-11-22 16:41:09 +00:00
parent 96da16ce33
commit d50600e263
8 changed files with 29 additions and 6 deletions

View File

@@ -56,7 +56,7 @@ ch3mon(oper, expp)
(*expp)->ex_flags &= ~EX_ILVALUE;
}
break;
case '&':
case ADDRESSOF:
if ((*expp)->ex_type->tp_fund == ARRAY) {
(*expp)->ex_type = pointer_to((*expp)->ex_type, 0);
}
@@ -87,7 +87,7 @@ ch3mon(oper, expp)
if (def->df_sc == REGISTER) {
expr_error(*expp,
"& on register variable not allowed");
break; /* break case '&' */
break; /* break case ADDRESSOF */
}
}
(*expp)->ex_type = pointer_to((*expp)->ex_type,