<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2018-03-08 15:19 GMT+01:00 Andrew Martin <span dir="ltr"><<a href="mailto:andrew.thaddeus@gmail.com" target="_blank">andrew.thaddeus@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>[...] Some of the bytes in the word will have garbage in them. However, this could always be masked out with a bit mask (you have to know the platform endianness for this to work right). Is this safe? I doubt think this could ever cause a segfault but I wanted to check.</div></div></blockquote><div><br></div><div>Before doing such things, please make sure that e.g. valgrind or similar tools are happy with such Kung-Fu. I don't know off the top of my head how fine-grained their checks are, but there is various similar code out there in the wild which is a PITA to debug. You might force people to add suppressions or even worse: Make some valuable tools totally useless. This is not something which should be done lightly...</div></div></div></div>