Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

bitfield support #1

Open
hidva opened this issue Nov 8, 2022 · 0 comments
Open

bitfield support #1

hidva opened this issue Nov 8, 2022 · 0 comments

Comments

@hidva
Copy link
Owner

hidva commented Nov 8, 2022

union u {
	long u_l;
	char u_c;
	long u_b: 2;
	S1 s1;
};

will be translated to:

union HidvaUnion3 {
  long int u_l;
  char u_c;
  __u8 __bitfield0[1];   // #1
  struct HidvaStruct1 s1;
  __u8 __HIDVA_dont_use2[16];
} __attribute__((__packed__));
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant