if this legal code?
der Mouse
mouse at thunder.mcrcim.mcgill.edu
Sat Jun 29 02:17:40 AEST 1991
In article <1991Jun25.235904.23103 at netcom.COM>, aed at netcom.COM (Andrew Davidson) writes:
> here is a piece of code I am responceible for maintaining.
> if (! ((tt = testEntry.code - testCode) || (tt = testEntry.leg - testLeg)))
> does the language guarentee that if testEntry.code -testCode is not
> equal to 0, that the second assignment (tt = testEntry.leg - testLeg)
> will not be executed?
Yes.
> will the -O compiler option flag effect this??
No, the code generator should effect it. The -O flag will not *affect*
it (this aspect of it, at least) unless the compiler is badly broken.
> personaly I would rewite this, but the orginal author will not allow
> my.
If you're maintaining it, it's your business, nay, your *duty* to make
changes like that that you feel will improve the code. (If you make
such judgements incorrectly, you're a bad choice as maintainer. In
this case I don't think you'd be wrong.) I assume this conflict
between supposed responsibility and actual privilege is imposed; you'll
have to decide whether it's worth making a fuss over....
der Mouse
old: mcgill-vision!mouse
new: mouse at larry.mcrcim.mcgill.edu
More information about the Comp.lang.c
mailing list