Re: padding mechanism in structures
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Wed, 15 Jun 2005 16:00:35 GMT
Mehta Shailendrakumar wrote:
>
.... snip ...
>
> The new functionality also allows you to use code, such as header
> files, that uses pack pragmas to set packing alignments that differ
> from the packing value set in your code:
>
> #pragma pack( push, before_include1 )
> #include "include1.h"
> #pragma pack( pop, before_include1 )
>
> In the previous example, your code is protected from any changes
> to the packing value that might occur in include.h.
>
> Name: pack.c
> pack.c Type: Textpad File (application/x-unknown-content-type-cfile)
> Encoding: x-uuencode
Never attach anything to a usenet article, especially a binary.
This is a text only medium.
In addition, pragma is not sanctioned by the standard. From N869:
[#1] A preprocessing directive of the form
# pragma pp-tokens-opt new-line
where the preprocessing token STDC does not immediately
follow pragma in the directive (prior to any macro
replacement)136) causes the implementation to behave in an
implementation-defined manner. The behavior might cause
translation to fail or cause the translator or the resulting
program to behave in a non-conforming manner. Any such
pragma that is not recognized by the implementation is
ignored.
--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
.
- References:
- padding mechanism in structures
- From: Roman Mashak
- Re: padding mechanism in structures
- From: Mehta Shailendrakumar
- padding mechanism in structures
- Prev by Date: Methods to handle filename extensions?
- Next by Date: Re: pow(2, 1/2) != pow(2, 0.5) problem
- Previous by thread: Re: padding mechanism in structures
- Next by thread: Re : padding mechanism in structures
- Index(es):
Relevant Pages
|