Turbo C++ 3.0 bugs

Eric J Korpela korpela at ssl.berkeley.edu
Thu Dec 15 10:21:07 CST 2005


On 12/14/05, Holger Veit <holger.veit at ais.fraunhofer.de> wrote:
> Thus, it is technically undefined what is
> printed for instance for printf("%d %d %d", i++,i--,i -= 3);
>
> The compiler has all rights to produce code that yields different
> results for both code fragments.
>

It's not only undefined what this code prints, it is undefined as to
whether the code prints anything.  The compiler is free to start a
game of tetris when it encounters the above code.  This is definitely
one of the nasal demon cases.

Eric



More information about the cctalk mailing list