Re: Mr. Seligman, please show me “ Implicit_Size_of_Int32 == -16 ”.



=?UTF-8?Q?Jeff=E2=98=A0Relf?= <Jeff_Relf@xxxxxxxxx> wrote:

Re: This code of mine:
â?? #pragma warning( disable: 4007 4189 4430 4508 )
WinMain( int, int, int, int ) {
const __int32 Int32 = 0 ; const __int64 Int64 = 0 ;

int Implicit_Size_of_Int32 = int( & Int64 ) - int( & Int32 );
// Breaking here, â?? Implicit_Size_of_Int32 == 8 â??.
} â??.

I'm taking about VC++ 8.0's default alignment, of course.
Can you, using the code above, get â?? Implicit_Size_of_Int32 == -16 â??,
Mr. Seligman ?

Yes, as soon as you turn on runtime checks (/RTC), and of course
things change further with other optimizations.

Your code produces 8 in a debug build with all optimizations and such
off, but that's very nearly useless information.

--
--------- Scott Seligman <scott at <firstname> and michelle dot net> ---------
Democracy is two wolves and a lamb voting on what to have for lunch.
Liberty is a well armed lamb contesting the vote.
-- Benjamin Franklin
.