* Greg KH:
On Fri, Dec 18, 2020 at 05:09:58PM +0800, Meng Zhuo wrote:
quoted
Hi, Greg
Thank you for your reply
It's fine to do compile bit fields "by hand".
Surely Go has something like "if (field & 0x01)", right? That's all you
need for a bitfield.
Look at the most common syscall, open(2)? It uses bitfields, why
can't Go handle that?
Flag arguments are very different from bit-fields in struct types.
Structs with bit-fields are not part of the highly portable C subset.
Even C compilers differ in their interpretation.
Thanks,
Florian
--
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill