Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I would be scared of using it for IO... With a struct bit field, I don't know what bit offset a field ends up with, I don't know how it gets padded, and I don't know how large the generated load and store becomes. I'd rather do the bit operations and store myself.


__attribute__((packed)) is pretty much required for this use case.


That gets rid of the padding issue, but still does little to tell me which bit corresponds to which field.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: