3 ms·
As I was discussing with 'gpderetta, it's complicated: https://news.ycombinator.com/item?id=23002423 https://news.ycombinator.com/item?id=23002423. Depending on
by saagarjha 7y ago
As I was discussing with 'gpderetta, it's complicated: https://news.ycombinator.com/item?id=23002423 https://news.ycombinator.com/item?id=23002423. Depending on how the followup to the DR I mentioned goes, your call is somewhere between "illegal as this invokes undefined behavior" and "sending structs across the wire better not be an infoleak". We'll see where the standards people take this. (Personally, I'm of the opinion that reading padding should always give an unspecified value–that is, a read can give an arbitrary, possibly inconsistent but valid value for that byte, but copies of it would have a fixed value. Code in the wild that has historically not cared for standards compliance anyways, e.g. Linux, should get a GCC flag for "make my padding bits what I want them to be".)
- deleted 7y ago[deleted]