Bug 45881 - bit offset of bitfields
Summary: bit offset of bitfields
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: unknown
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-04 13:59 UTC by Jan Waclawek
Modified: 2010-10-04 13:59 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Waclawek 2010-10-04 13:59:10 UTC
A (builtin) function, returning bit offset for bitfields within structs, could be useful to pass bit "addresses" as function parameters.

In analogy to offsetof()/sizeof(), a similar function returning number of bits of a bitfield could be created, too, although it would be less useful than the offset.