On 7/12/2011 10:11 PM, bcs wrote:
I broke down and installed wine:
bcs@doors:~/Downloads/dmc$ cat split.cpp
#include<stdio.h>
struct S0 {
unsigned f1 : 1;
};
struct S0 s;
int main (void) {
int x = -3;
int y = x>= (0, s.f1);
printf ("%d\n", y);
return 0;
}
bcs@doors:~/Downloads/dmc$ wine dm/bin/dmc.exe split.cpp
link split,,,user32+kernel32/noi;
bcs@doors:~/Downloads/dmc$ wine split.exe
1
seems DMC is broke too, but it's debatable if this test case is of
value to DMD.
I think DMC is correct here.
x >= (0, s.f1)
is typed as:
int >= (int, unsigned)
which is:
int >= unsigned
which does an unsigned compare,
0xFFFFFFFD >= 1
which evaluates to:
1