pragma option for packed

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

pragma option for packed

916件の閲覧回数
preetuabraham
Contributor III

Hi,

 

I would like to know the settings for changing this pragma to a different below in Code warrior 10.x for Cold fire processor MC5485 processor ,since the below line is throwing an error that it is an illegal pragma

 

//#pragma options align=packed.  This was working in Metrowerks Codewarrior

 

Whether we can use #pragma options align= coldfire instead of the packed

ラベル(1)
0 件の賞賛
返信
1 返信

742件の閲覧回数
preetuabraham
Contributor III

Hi,

As per the MCU_Codlfire_Compiler.pdf(page no:355), I think the equivalent pragma directive is

#pragma pack (0 | n | push | pop) , where n  is 1, 2, 4, 8, or 16.

So anyone from Codewarrior ,correct me if I am wrong .

Pelase clarify whether if n is 2 ,whether it is 2 byte alignment for structures and if n is 4 ,whether it is 4 byte alignment for structures

0 件の賞賛
返信