Microsoft's C++ compiler has violated the ISO language standard for at least the last three versions
Submitted for discussion... You will find this interesting. Take this program:
#include "stdio.h"
int main()
{
int a = 2;
int b = 3;
b++;
a = b++ * a++;
int c = a % b;
printf("a = %d b = %d c = %d",a,b,c);
return 0;
}
and compile it. Depending on where you compile, you get different results:
gcc: a = 8 b = 5 c = 3
MS c++ Version 6, 7, and 8: a = 9 b = 5 c = 4
MS c#: a = 8 b = 5 c = 3 So, I think this says that Microsoft's c++ compiler has violated the iso language standard at least for the last three versions, and they are now fixing the bug in their c# compiler. Think of all that MS code out there that is broken! |
|
| Subject | Topic Starter | Replies | Views | Last Post |
|---|---|---|---|---|
| Doubt it; I believe ISO does NOT define a=...a++ | dwheeler | 4 | 2,784 | Mar 1, 2005 10:03 AM |
You cannot post until you login.
