DEFINITE bug in Turbo C 2.0
Jim Harkins
jharkins at sagpd1.UUCP
Sat Mar 24 10:31:16 AEST 1990
In article <802 at zeusa.UUCP> hendrik at zeusa.UUCP (Hendrik Vermooten) writes:
>Here is a definite bug in C (discovered by Renier v. Wyk)
> x = SQR (++a); printf("%d\n", a);
> printf ("%d\n", SQR (++a));
>
> (complains that that this prints different numbers)
Um, if I understand the phrase 'the evaluation order is undefined' correctly
then the only bug is the one you stepped on on the way to your desk. I don't
see any reason for a compiler to treat these 2 cases the same. Please be
a bit more careful before claiming a product has a DEFINATE bug in the future.
--
jim jharkins at sagpd1
We are all aware of the high cost of alcohol abuse. To help solve this problem
take this signature to your local liquor store for $1.00 off your next purchase.
More information about the Comp.lang.c
mailing list