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

I'm pretty sure the exact layout is not guaranteed in this case, so while the above code may work in many cases it's not possible to represent all data structures like this, particularly if the bits are not byte or machine word aligned.

I don't think the standard even guarantees which bits in an integer the bitfields will be stored. That's important for network protocols.



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

Search: