From: Peter on
Hi,
I found in doc that default struct member alignment (/Zp compiler switch) is
8 bytes.
Is it true also for x64 compilations ?

Peter
From: Thomas F. Divine on
Perhaps this MSDN article will help:

"Windows Data Alignment on IPF, x86, and x64"

http://msdn.microsoft.com/en-us/library/aa290049(VS.71).aspx

Thomas F. Divine
http://www.pcausa.com


"Peter" <Peter(a)discussions.microsoft.com> wrote in message
news:5B746C3F-BD54-40A9-B921-80C7B28B7C6F(a)microsoft.com...
> Hi,
> I found in doc that default struct member alignment (/Zp compiler switch)
> is
> 8 bytes.
> Is it true also for x64 compilations ?
>
> Peter

From: Maxim S. Shatskih on
> Is it true also for x64 compilations ?

Yes, but pointers and handles are 8byte and not 4byte.

--
Maxim S. Shatskih
Windows DDK MVP
maxim(a)storagecraft.com
http://www.storagecraft.com

From: Doron Holan [MSFT] on
you can easily open a 64 bit build window, build a sample and see what
/Zp<N> parameter is placed on the cmd line to cl.exe

d

--

This posting is provided "AS IS" with no warranties, and confers no rights.


"Peter" <Peter(a)discussions.microsoft.com> wrote in message
news:5B746C3F-BD54-40A9-B921-80C7B28B7C6F(a)microsoft.com...
> Hi,
> I found in doc that default struct member alignment (/Zp compiler switch)
> is
> 8 bytes.
> Is it true also for x64 compilations ?
>
> Peter

From: m on
Or more reliably, build a sample and look at the alignment of a structure.
/Zp is often overridden in header files with pragma pack, but the binary
never lies ;)

"Doron Holan [MSFT]" <doron.holan(a)online.microsoft.com> wrote in message
news:uiH8zuBsKHA.6004(a)TK2MSFTNGP04.phx.gbl...
> you can easily open a 64 bit build window, build a sample and see what
> /Zp<N> parameter is placed on the cmd line to cl.exe
>
> d
>
> --
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>
> "Peter" <Peter(a)discussions.microsoft.com> wrote in message
> news:5B746C3F-BD54-40A9-B921-80C7B28B7C6F(a)microsoft.com...
>> Hi,
>> I found in doc that default struct member alignment (/Zp compiler switch)
>> is
>> 8 bytes.
>> Is it true also for x64 compilations ?
>>
>> Peter
>