Re: Mr. Seligman, please show me “ Implicit_Size_of_Int32 == -16 ”.
- From: "Scott Seligman" <seligman@xxxxxxxxxxx>
- Date: 4 Dec 2007 16:23:30 -0800
=?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
.
- Follow-Ups:
- BytesOff_8_ByteAlignment is always Zero.
- From: Jeff☠Relf
- BytesOff_8_ByteAlignment is always Zero.
- References:
- Re: Eight-byte alignment
- From: Scott Seligman
- Mr. Seligman, please show me “ Implicit_Size_of_Int32 == -16 ”.
- From: Jeff☠Relf
- Re: Eight-byte alignment
- Prev by Date: Re: Passing an already declarted array of structures!
- Next by Date: BytesOff_8_ByteAlignment is always Zero.
- Previous by thread: Mr. Seligman, please show me “ Implicit_Size_of_Int32 == -16 ”.
- Next by thread: BytesOff_8_ByteAlignment is always Zero.
- Index(es):
Relevant Pages
|