Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Philipp Klaus Krause <pkk@spth.de> |
|---|---|
| Newsgroups | comp.std.c |
| Subject | bit-precise bit-fields |
| Date | 2022-01-04 13:15 +0100 |
| Message-ID | <sr1dpq$bch$1@solani.org> (permalink) |
C23 Bit-precise integer types (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2763.pdf) allow programmers to explicitly state their intent on how many bits are needed; but since they are addressable, they need padding bits when their width is not a multiple of CHAR_WIDTH. Some implementations might use more padding for alignment. Where there is a need to save memory, they are thus not suitable. Using bit-precise integer types in bit-fields solves this issue. So, I'd like to see bit-fields of bit-precise integer types in C: http://www.colecovision.eu/stuff/proposal-bit-precise-bit-fields.html
Back to comp.std.c | Previous | Next — Next in thread | Find similar | Unroll thread
bit-precise bit-fields Philipp Klaus Krause <pkk@spth.de> - 2022-01-04 13:15 +0100
Re: bit-precise bit-fields Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-01-17 09:51 -0800
Re: bit-precise bit-fields David Brown <david.brown@hesbynett.no> - 2022-01-17 20:03 +0100
csiph-web