some fixes, and changed priority of unary minus

This commit is contained in:
ceriel
1987-06-18 15:46:08 +00:00
parent 9c01340900
commit c839c01680
13 changed files with 94 additions and 35 deletions

View File

@@ -758,6 +758,10 @@ ChkBinOper(expp)
- The IN-operator has as right-hand-size operand a set.
*/
if (expp->nd_symb == IN) {
if (tpr->tp_fund != T_SET) {
node_error(expp, "\"IN\": right operand must be a set");
return 0;
}
if (!TstAssCompat(tpl, ElementType(tpr))) {
/* Assignment compatible ???
I don't know! Should we be allowed to check
@@ -831,12 +835,13 @@ ChkUnOper(expp)
switch(expp->nd_symb) {
case '+':
if (tpr->tp_fund & T_NUMERIC) {
*expp = *right;
free_node(right);
return 1;
}
break;
if (!(tpr->tp_fund & T_NUMERIC)) break;
/* fall through */
case '(':
*expp = *right;
free_node(right);
return 1;
case '-':
if (tpr->tp_fund & T_INTORCARD) {