#ifndef lint
-static char sccsid[] = "@(#)lint.c 1.5 (Berkeley) 3/30/83";
+static char sccsid[] = "@(#)lint.c 1.10 (Berkeley) 3/20/86";
#endif lint
-# include "mfile1"
+# include "pass1.h"
-# include "lmanifest"
+# include "lmanifest.h"
# include <ctype.h>
t.extra = (p->in.op==ICON);
t.extra1 = 0;
- if( !astype( &t, p->in.csiz ) ) {
+ if( !astype( &t, p->fn.csiz ) ) {
switch( t.aty ){
case CHAR:
register o;
register unsigned t, tl;
+ int s;
switch( o = p->in.op ){
/* assume conversion takes place; type is inherited */
t = p->in.type;
tl = p->in.left->in.type;
- if( aflag && (tl==LONG||tl==ULONG) && (t!=LONG&&t!=ULONG) ){
+ if( aflag && (tl==LONG||tl==ULONG) && (t!=LONG&&t!=ULONG&&t!=UNDEF) ){
werror( "long assignment may lose accuracy" );
}
if( aflag>=2 && (tl!=LONG&&tl!=ULONG) && (t==LONG||t==ULONG) && p->in.left->in.op != ICON ){
p->in.op = FREE;
return( buildtree( o==PMCONV?MUL:DIV, p->in.left, p->in.right ) );
+ case RS:
+ case LS:
+ case ASG RS:
+ case ASG LS:
+ if( p->in.right->in.op != ICON )
+ break;
+ s = p->in.right->tn.lval;
+ if( s < 0 )
+ werror( "negative shift" );
+ else
+ if( s >= dimtab[ p->fn.csiz ] )
+ werror( "shift greater than size of object" );
+ break;
+
}
return(p);
static union rec fsname;
s = strip( s );
#ifndef FLEXNAMES
- if( strncmp( s, fsname.f.fn, LFNM ) ){
+ if( strncmp( s, fsname.f.fn, LFNM ) )
#else
- if (fsname.f.fn == NULL || strcmp(s, fsname.f.fn)) {
+ if (fsname.f.fn == NULL || strcmp(s, fsname.f.fn))
#endif
+ {
/* new one */
#ifndef FLEXNAMES
strncpy( fsname.f.fn, s, LFNM );
/* lint version
*/
dcon = atof( s );
- return( FCON );
+ return( DCON );
}
fldcon( p ) register NODE *p; {