Re: Ben, how do you explain " Implicit_Size_o f_Int32 == 8 " ?
"Jeff?Relf" <Jeff_Relf@Yaho o.COMwrote in message
news:Jeff_Relf_ 2007_Dec_5__1_3 7_P7@Cotse.NET. ..
Alignment creates padding, but padding does not create alignment.
By measuring padding, you have not measured alignment. Really.
You mean it shows that your assertion that the VC++ compiler always aligns
to 8 byte boundaries is wrong.
"Jeff?Relf" <Jeff_Relf@Yaho o.COMwrote in message
news:Jeff_Relf_ 2007_Dec_5__1_3 7_P7@Cotse.NET. ..
?_Ben_Voigt_C, _D71eGS.Airband .NET Phx.GBL
2.48 Hours, Outlook_O19, Dec 5, 2007, 11._1 A, BS99eu
>
Re: This VC++ 8 code of mine, without the " /O2 " compiler option:
" #pragma warning( disable: 4007 4189 4430 4508 )
WinMain( int, int, int, int ) {
const __int32 Int32 = 0 ; const __int64 Int64 = 0 ;
>
int Implicit_Size_o f_Int32 = int( & Int64 ) - int( & Int32 );
// Breaking here, ' Implicit_Size_o f_Int32 == 8 '.
} ".
>
Implicit_Size_o f_Int32 is 8 --because <-- VC++ aligned Int64.
Yes, that created some padding, but that's not the issue.
2.48 Hours, Outlook_O19, Dec 5, 2007, 11._1 A, BS99eu
>
Re: This VC++ 8 code of mine, without the " /O2 " compiler option:
" #pragma warning( disable: 4007 4189 4430 4508 )
WinMain( int, int, int, int ) {
const __int32 Int32 = 0 ; const __int64 Int64 = 0 ;
>
int Implicit_Size_o f_Int32 = int( & Int64 ) - int( & Int32 );
// Breaking here, ' Implicit_Size_o f_Int32 == 8 '.
} ".
>
Implicit_Size_o f_Int32 is 8 --because <-- VC++ aligned Int64.
Yes, that created some padding, but that's not the issue.
By measuring padding, you have not measured alignment. Really.
>
As I recently said in " news:Jeff_Relf_ 2007_Dec_5__1_2 9_Pw@Cotse.NET ",
the " /O2 " compiler option f u c k s things up.
>
As I recently said in " news:Jeff_Relf_ 2007_Dec_5__1_2 9_Pw@Cotse.NET ",
the " /O2 " compiler option f u c k s things up.
>
to 8 byte boundaries is wrong.
Comment