Intel i960 User Manual page 213

Processor compiler
Hide thumbs Also See for i960:
Table of Contents

Advertisement

7
7-24
i960 Processor Compiler User's Guide
/* 2-byte boundaries and is the largest*/
/* member of inner2; thus the default
/* alignment of inner2 is 2.
int i2;
};
#pragma noalign (outer3)
struct outer3 {
struct {
/* Since the inner structure has no tag, it*/
short s;
/* is aligned the same as the immediately
char c ;
/* enclosing structure, outer3.
} si1;
/* structures are packed.
int i2;
};
The following example shows nested unnamed structure definitions and
alignment pragmas:
#pragma align my_structure = 16
struct my_structure
{
char f1;
struct
{
int ff2;
} f2;
};
#pragma align my_structure2 = 16
struct my_structure2
{
char f1;
#pragma align 4
struct
{
int ff2;
} f2;
};
/* If no more alignment pragmas appear, any subsequent
* structs have 4-byte alignment.
*/
/* outer3 is packed. */
Thus both */
/* 16-byte alignment */
/* 16-byte alignment */
/* 16-byte alignment */
/* 16-byte alignment */
*/
*/
*/
*/

Advertisement

Table of Contents
loading

Table of Contents