#pragma options align= packed and CodeWarrior for ColdFire V6.3

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

#pragma options align= packed and CodeWarrior for ColdFire V6.3

2,328 Views
ajn
Contributor I
We try to upgrade to from CodeWarrior for ColdFire V4.0 to CodeWarrior for ColdFire V6.3
We have compiled the code below with the old compiler without any problem but when we use the new compiler we get following error:
 
What shall we do to fix this problem?
 
#pragma options align= packed
 
typedef struct
{
   unsigned char event_msg_id;     // TLMI_TLEVENT | TLMI_DCT_DSU_EVENT_NO_LOCAL | TLMI_DCT_DSU_EVENT
   unsigned char from_node;        // Source node for the event, used with appack
   unsigned char event_type;       // Type of event, see evtdef.h
   unsigned char appack_tid;       // The task id for the appack
   unsigned char appack_id;        // The appack id we should send back
   event_type info;                // The event it self...
} tl_event_msg_type;
 
#pragma options align=reset
 
mwccmcf.exe|Compiler|Warning
(C:\Projects\bewapass\entro\sr34i\src\v5\include\event.h|24|0|7|449|7)
=typedef struct
>illegal #pragma
mwccmcf.exe|Compiler|Error
(C:\Projects\bewapass\entro\sr34i\src\v5\include\event.h|25|0|1|465|1)
={
>declaration syntax error
Labels (1)
0 Kudos
2 Replies

544 Views
ajn
Contributor I
I have found the problem, it was in our own code, now #pragma options align= packed is working.
 
 
 
 
0 Kudos

544 Views
ajn
Contributor I
Just for a test If I change from:
#pragma options align=packed to
#pragma options align=mac68k
 
and I am now able to compile the code, so how do I enable packed switch? See the description of the whole problem below
 
 
 
We try to upgrade to from CodeWarrior for ColdFire V4.0 to CodeWarrior for ColdFire V6.3
We have compiled the code below with the old compiler without any problem but when we use the new compiler we get following error:
 
What shall we do to fix this problem?
 
#pragma options align= packed
 
typedef struct
{
   unsigned char event_msg_id;     // TLMI_TLEVENT | TLMI_DCT_DSU_EVENT_NO_LOCAL | TLMI_DCT_DSU_EVENT
   unsigned char from_node;        // Source node for the event, used with appack
   unsigned char event_type;       // Type of event, see evtdef.h
   unsigned char appack_tid;       // The task id for the appack
   unsigned char appack_id;        // The appack id we should send back
   event_type info;                // The event it self...
} tl_event_msg_type;
 
#pragma options align=reset
 
mwccmcf.exe|Compiler|Warning
(C:\Projects\bewapass\entro\sr34i\src\v5\include\event.h|24|0|7|449|7)
=typedef struct
>illegal #pragma
mwccmcf.exe|Compiler|Error
(C:\Projects\bewapass\entro\sr34i\src\v5\include\event.h|25|0|1|465|1)
={
>declaration syntax error


0 Kudos