Quantcast
Channel: User HolyBlackCat - Stack Overflow
Viewing all articles
Browse latest Browse all 1287

Comment by HolyBlackCat on is there any UB in reinterpreting a standard layout struct as an unsigned char*

$
0
0
You can access any type through unsigned char *, it's excluded from strict aliasing. Compiler adding padding between struct members could cause issues, but they don't do that in practice for members of the same type.

Viewing all articles
Browse latest Browse all 1287

Trending Articles



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