Quantcast
Channel: User Peter - Reinstate Monica - Stack Overflow
Viewing all articles
Browse latest Browse all 239

Comment by Peter - Reinstate Monica on When a struct member is a struct, its alignment and size are different from native types?

$
0
0
@dsyx Well, you can limit compiler dependencies by using explicitly-sized types (which you are already doing). You can control the remaining dependencies by using compiler specific methods (pragma pack) that are widely supported though; and you can assert that a port leads to the expected layout by asserting sizes at compile time and offsets (I think only at run time).

Viewing all articles
Browse latest Browse all 239

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>