Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rochester!cornell!uw-beaver!mit-eddie!ll-xn!ames!oliveb!sun!gorodish!guy From: guy%gorodish@Sun.COM (Guy Harris) Newsgroups: comp.bugs.4bsd,comp.lang.c Subject: Re: pcc bug Message-ID: <22243@sun.uucp> Date: Sat, 27-Jun-87 05:18:29 EDT Article-I.D.: sun.22243 Posted: Sat Jun 27 05:18:29 1987 Date-Received: Sun, 28-Jun-87 01:04:52 EDT References: <1781@megaron.arizona.edu> Sender: news@sun.uucp Lines: 68 Xref: mnetor comp.bugs.4bsd:400 comp.lang.c:2687 > Bug: pcc compiles without complaint the program: > > main(x,y) > int x, main; > { > printf("oops\n"); > } Another one of many PCC front end problems. A fix, of sorts - it causes the compiler at least to recognize that "main" is not given in the argument list. *** pftn.c Mon May 4 13:52:14 1987 --- pftn.c.fixed Sat Jun 27 00:19:38 1987 *************** *** 93,116 **** if( stp == FTN && p->sclass == SNULL )goto enter; /* name encountered as function, not yet defined */ - if( stp == UNDEF|| stp == FARG ){ - if( blevel==1 && stp!=FARG ) switch( class ){ ! default: ! /* "declared argument %.8s is missing" */ ! /* "declared argument %s is missing" */ ! if(!(class&FIELD)) UERROR( MESSAGE( 28 ), p->sname ); ! case MOS: ! case STNAME: ! case MOU: ! case UNAME: ! case MOE: ! case ENAME: ! case TYPEDEF: ! ; ! } ! goto enter; ! } if( type != stp ) goto mismatch; /* test (and possibly adjust) dimensions */ --- 93,116 ---- if( stp == FTN && p->sclass == SNULL )goto enter; /* name encountered as function, not yet defined */ ! if( blevel==1 && stp!=FARG ) switch( class ){ ! ! default: ! /* "declared argument %.8s is missing" */ ! /* "declared argument %s is missing" */ ! if(!(class&FIELD)) UERROR( MESSAGE( 28 ), p->sname ); ! case MOS: ! case STNAME: ! case MOU: ! case UNAME: ! case MOE: ! case ENAME: ! case TYPEDEF: ! ; ! } ! ! if( stp == UNDEF|| stp == FARG ) goto enter; if( type != stp ) goto mismatch; /* test (and possibly adjust) dimensions */ Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com