lint: additional type tests in expressions

This commit is contained in:
dick
1988-09-29 15:24:02 +00:00
parent 6ae90c8f34
commit 4f8b2e9926
11 changed files with 320 additions and 77 deletions

View File

@@ -12,6 +12,7 @@
*/
#include <alloc.h>
#include "lint.h"
#include "nofloat.h"
#include "nobitfield.h"
#include "idf.h"
@@ -163,7 +164,9 @@ any2arith(expp, oper)
else
expr_warning(*expp, "%s on enum", symbol2str(oper));
#endif NOROPTION
#ifndef LINT
int2int(expp, int_type);
#endif LINT
break;
#ifndef NOFLOAT
case FLOAT:
@@ -420,53 +423,6 @@ is_test_op(oper)
/*NOTREACHED*/
}
#ifdef ____
int
is_arith_op(oper)
{
switch (oper) {
case '*':
case '/':
case '%':
case '+':
case '-':
case LEFT:
case RIGHT:
case '&':
case '^':
case '|':
return 1;
default:
return 0;
}
}
int
is_asgn_op(oper)
{
switch (oper) {
case '=':
case PLUSAB:
case MINAB:
case TIMESAB:
case DIVAB:
case MODAB:
case LEFTAB:
case RIGHTAB:
case ANDAB:
case ORAB:
case XORAB:
case PLUSPLUS:
case POSTINCR:
case MINMIN:
case POSTDECR:
return 1;
default:
return 0;
}
}
#endif
any2opnd(expp, oper)
register struct expr **expp;
{