Renesas Technology, Tools FAQs
Last Updated: July 21, 2000
Document Number: 01051014_e
Q.
I want to declare a combination of bit fields, such as a combination of 3, 10, and 11 bit widths, without leaving blank bits between
each field (without padding). How can I do that?
A.
Declare the same variable type with the bit size larger than that of the total number of bits of all the continuing fields. Through this
method, you can fill bit field variables without making blank bits (without padding).
[Example program]
typedef struct {
unsigned long BIT0_9 :10;
unsigned long BIT10_20 :11;
unsigned long BIT21_23 : 3;
} BIT0_23;
Top of Page | Back to Previous Page
Terms of Use Privacy Policy
(C)2004 Renesas Technology Corp., All Rights Reserved.
Kommentare zu diesen Handbüchern