Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site watmath.UUCP Path: utzoo!watmath!rbutterworth From: rbutterworth@watmath.UUCP (Ray Butterworth) Newsgroups: net.lang.c,net.bugs Subject: Re: C Compiler bug (and fix for a different one) Message-ID: <273@watmath.UUCP> Date: Fri, 25-Jul-86 08:43:49 EDT Article-I.D.: watmath.273 Posted: Fri Jul 25 08:43:49 1986 Date-Received: Sat, 26-Jul-86 05:46:51 EDT References: <501@bunny.UUCP> <500@copper.UUCP> Distribution: net Organization: U of Waterloo, Ontario Lines: 33 Xref: watmath net.lang.c:10049 net.bugs:844 > > i = i/2.5; > vs. > > i /= 2.5; So, does anyone have a fix for this bug? I'll trade for a fix for a problem with void functions and the ?: operator. void f3(which) { extern void f1(),f2(); which?f1():f2(); } cc(1) gives an "incompatible types" error. In /usr/src/lib/mip/trees.c add the line indicated by "->>". This lets the above code lint and compile ok (and I don't think it causes any new problems). ... opact( p ) NODE *p; { ... switch( optype(o=p->in.op) ){ ... case COLON: if( mt12 & MENU ) return( NCVT+PUN+PTMATCH ); else if( mt12 & MDBI ) return( TYMATCH ); ... else if( mt12 & MSTR ) return( NCVT+TYPL+OTHER ); ->> else if ( (!mt1) && (!mt2) ) return TYPL; break; case ASSIGN: