Hello.
I have two projects: one in MS Visual studio and one in Code Composer.
In MSVC project I have large header file with a lot of structures. All structures in this file are aligned by pragma pack:
#pragma pack(push,4)
typedef struct MyStruct
{
int a;
int b;
int b;
}
MyStruct;
#pragma pack(pop)
But code composer does not support pragma pack.
I tried to redefine struct as below
typedef struct MyStruct
{
int a __attribute__ ((aligned (4)));
int b __attribute__ ((aligned (4)));
int b __attribute__ ((aligned (4)));
}
MyStruct;
and enable gcc support, but it doesn't work.
How should I rewrite structures definitions?
Is there any way not to apply attributes to every pack or structure, but place lines is start and end of the file?