This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

about sizeof struct problem

Hi everyone.

I am using dm8168 on DVRRDK_04.00.00.03.

In DSP side,I define a strcut like

typedef struct tagHEADER {
 unsigned short    bfType;
 unsigned long   bfSize;
 unsigned short    bfReserved1;
 unsigned short    bfReserved2;
 unsigned long   bfOffBits;
} XXXHEADER;

and I am expecting sizeof(XXXHEADER)=14

but actually it is 16.

In the ARM side I can use the #pragma pack(1)  to get the result that I wanted,but the DSP side no #pragma pack(1) to use,and I read the cgt6x_7_3_5\doc\SPRU187T.pdf,the cl6x compiler provide the

#pragma STRUCT_ALIGN(symbol,constant);

#pragma DATA_ALIGN( symbol,constant)

and I set the constant to 1,It does not work.

why???