> Hi,
> 
> I don't use linux for development anymore, but I used to have to reverse the
> order of bitfields when creating targets for PC(Linux) and PalmPilot, like
> so:
> 
> struct {
> #ifdef  i386
> uchar field1: 3;
> uchar field2: 5;
> #else
> uchar field2: 5;
> uchar field1: 3;
> #endif
> }
> 
> Now I moved to Widows and use CW and  VisualC++, and it seems like you no
> longer need to reverse the bitfields in order to make the data compatible.
> 
> I use bitfields all over the place, and removing the ifdefs fixed the one
> case I looked at in my code.  But as a sanity check, I'd like to know if
> anyone else has experienced the nuances of using bitfields on different
> platforms to know if this is the case.
> 
> -Jason

Yes I use the same trick when compiling for mac and windows using
CodeWarrior on Mac and Visual Studio on windows.

But it seems more compiler dependant than platform dependant.

regards...


Eric

Reply via email to