Re: #pragma unpack
- From: "James Hayhurst" <jameshay@xxxxxxxxxxxxx>
- Date: Thu, 6 Dec 2007 18:38:45 -0800
The WinCE compiler supports #pragma pack to control how primary datatypes
are aligned in a struct or class.
Each data type has a natural alignment:
Data type | Natural alignment on 32 bit platforms | Alignment on 64bit
------------------------------------------------------------------------
__int8 | 1 byte aligned (any adress is ok) | <same>
__int16 | 2 byte aligned | <same>
__int32 | 4 byte aligned | <same>
__int64 | 4 byte aligned | 8 byte
aligned
Using #pragma back you can change this alignment to any power of 2.
For more info check out MSDN:
http://msdn2.microsoft.com/en-us/library/2e70t5y1(VS.80).aspx
"buzz" <bzburr@xxxxxxxxxxxx> wrote in message
news:38f9ebd8-21bc-4ceb-ac6c-81d5988a438c@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
hello
i have inherited a evc++ project
Upon compilation there are numerous c468 errors for unknown pragmas
Notably
"unpack" and "pop pack" surrounding typedefs for structures
can someone please point me in the correct direction so i can compile
without these warnings ?
My understanding is that in the application these pragmas do an
important job :)
Regards and thanks
Buzz
.
- Prev by Date: Re: EDIT woes
- Next by Date: Re: EDIT woes
- Previous by thread: Re: LoadIntChainHandler
- Next by thread: About universal keyboard control (hook ?)
- Index(es):
Relevant Pages
|