gcc, powerpc and bit field operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi..
 
I am using gcc-2.95 and am having trouble with bit field operations.
 
I have no trouble defining and compiling progs, but during execution I have problems.
 
No matter how I define a bit field      
 
                                unsigned    char        : 4;
                                unsigned    short       : 4;
                                unsigned    int           : 4;
 
the compiled code always uses word length instructions  so if the fields are all contained in 16bit... a 32bit are accessed.
This usually not a problem but when mapped to hardware I get access exception because the adjacent 16bits are protected..
 
 
Is the a way to fix this or is the what "non-portable" means (among other things)
 
 
roman


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux