gcc/cc difference

Roland Rambau roland at cochise.pcs.com
Thu Jun 28 21:18:09 AEST 1990


maart at cs.vu.nl (Maarten Litmaath) writes:

->)>>>	mflag ? *buf++ -=mean.median : Mflag ? *buf++
->)>>>	    -=mean.mode : *buf++ -=mean.mean;

->The expression is of this form:

->	a ? b : c = d;

->The illegal lvalue is:

->	a ? b : c

->(sic)!  The `?:' operator has a higher priority than the various assignment
->operators.  The following does what was intended:

->	a ? b : (c = d);

What really was intended is

        *buf -= mfag ? mean.median : Mfalg ? mean.mode : mean.mean ;
        buf += 3 ;

( Or did I get this wrong, and the original does NOT increment tree times ? )


Roland Rambau

  rra at cochise.pcs.com,   {unido|pyramid}!pcsbst!rra,   2:507/414.2.fidonet 



More information about the Comp.lang.c mailing list