volatile required?

Don_A_Corbitt at cup.portal.com Don_A_Corbitt at cup.portal.com
Mon Oct 2 13:48:48 AEST 1989


In article <???> Anthony Scian afscian at violet.uwaterloo.ca wrote
[rest of article deleted]
>>Is it acceptable that this program prints 3 instead of 4? 
>NO. This is a convenient type of oversight that allows so called
>"optimizing compilers" like Turbo C and Microsoft C to squeeze
>out extra performance from benchmarks. Too bad if production code
>doesn't run with the optimizer turned on. True optimizing
>compilers (WATCOM C,GNU CC) don't resort to "tricks" like this.
>--
>Anthony
>//// Anthony Scian afscian at violet.uwaterloo.ca afscian at violet.waterloo.edu ///
/

I have heard that MSC 5.0 had optimizer problems, and most are fixed in 5.1.
Of more importance, Turbo C doesn't have an 'aggressive' optimizer, and is
not guilty of the sin mentioned here.  It generates fairly good code anyway.

Don_A_Corbitt at cup.portal.com     Not a spokesperson for CrystalGraphics, Inc.
"Mail flames, post apologies"    "Support the three-line signature"
Contrary to popular belief



More information about the Comp.std.c mailing list