G
Guest
I beleave I have found a bug in the C++ compiler of Visual Studio 200
The correct output for the code below is "Color is: 99b2cce5" but if I turn on the Pentium 4 and above (/G7) options
I get the follow result "Color is: 80000000" which is completly wrong
I found this bug when upgrading from visual studio 6.0 and my colors turned black! :
/O2 /Ot /G7 /I "../../DevelopmentSystem" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Gm /EHsc /MD /Fp".\Release/Europe.pch" /Fo"Release/" /Fd"Release/vc70.pdb" /FR"Release/" /W3 /nologo /c /Wp64 /Z
class Tes
public
float a, r, g, b
uint get(
uint c = a*255; c<<=8
c += r*255; c<<=8
c += g*255; c<<=8
c += b*255
return c
}
void main(int argc, const char **argv
Test test
test.a = .6
test.r = .7
test.g = .8
test.b = .9
uint c = test.get()
printf("%x\n", c)
The correct output for the code below is "Color is: 99b2cce5" but if I turn on the Pentium 4 and above (/G7) options
I get the follow result "Color is: 80000000" which is completly wrong
I found this bug when upgrading from visual studio 6.0 and my colors turned black! :
/O2 /Ot /G7 /I "../../DevelopmentSystem" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Gm /EHsc /MD /Fp".\Release/Europe.pch" /Fo"Release/" /Fd"Release/vc70.pdb" /FR"Release/" /W3 /nologo /c /Wp64 /Z
class Tes
public
float a, r, g, b
uint get(
uint c = a*255; c<<=8
c += r*255; c<<=8
c += g*255; c<<=8
c += b*255
return c
}
void main(int argc, const char **argv
Test test
test.a = .6
test.r = .7
test.g = .8
test.b = .9
uint c = test.get()
printf("%x\n", c)