diff options
author | jmz <jmz@FreeBSD.org> | 1997-04-13 01:13:52 +0000 |
---|---|---|
committer | jmz <jmz@FreeBSD.org> | 1997-04-13 01:13:52 +0000 |
commit | 5d93c9d5fb208d10eacf608b44ee02d3cd5b4a16 (patch) | |
tree | ac4dad5704ec3ceee2678cc665cb3fad24d50c45 /usr.bin/f2c/gram.dcl | |
parent | 5b8c55b34e7a6f0087c138e43e85652af3f37aee (diff) | |
download | FreeBSD-src-5d93c9d5fb208d10eacf608b44ee02d3cd5b4a16.zip FreeBSD-src-5d93c9d5fb208d10eacf608b44ee02d3cd5b4a16.tar.gz |
Upgrade to the 1997/02/19 version.
Diffstat (limited to 'usr.bin/f2c/gram.dcl')
-rw-r--r-- | usr.bin/f2c/gram.dcl | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/usr.bin/f2c/gram.dcl b/usr.bin/f2c/gram.dcl index fadbb5b..b30a45c 100644 --- a/usr.bin/f2c/gram.dcl +++ b/usr.bin/f2c/gram.dcl @@ -138,11 +138,11 @@ equivset: SLPAR equivlist SRPAR equivlist: lhs { $$=ALLOC(Eqvchain); - $$->eqvitem.eqvlhs = (struct Primblock *)$1; + $$->eqvitem.eqvlhs = primchk($1); } | equivlist SCOMMA lhs { $$=ALLOC(Eqvchain); - $$->eqvitem.eqvlhs = (struct Primblock *) $3; + $$->eqvitem.eqvlhs = primchk($3); $$->eqvnextp = $1; } ; @@ -229,6 +229,7 @@ var: name dims datavar: lhs { Namep np; + struct Primblock *pp = (struct Primblock *)$1; int tt = $1->tag; if (tt != TPRIM) { if (tt == TCONST) @@ -236,16 +237,27 @@ datavar: lhs else erri("tag %d in data statement",tt); $$ = 0; + err_lineno = lineno; break; } - np = ( (struct Primblock *) $1) -> namep; + np = pp -> namep; vardcl(np); + if ((pp->fcharp || pp->lcharp) + && (np->vtype != TYCHAR || np->vdim)) + sserr(np); if(np->vstg == STGCOMMON) extsymtab[np->vardesc.varno].extinit = YES; else if(np->vstg==STGEQUIV) eqvclass[np->vardesc.varno].eqvinit = YES; - else if(np->vstg!=STGINIT && np->vstg!=STGBSS) - dclerr("inconsistent storage classes", np); + else if(np->vstg!=STGINIT && np->vstg!=STGBSS) { + errstr(np->vstg == STGARG + ? "Dummy argument \"%.60s\" in data statement." + : "Cannot give data to \"%.75s\"", + np->fvarname); + $$ = 0; + err_lineno = lineno; + break; + } $$ = mkchain((char *)$1, CHNULL); } | SLPAR datavarlist SCOMMA dospec SRPAR |