There is also some discussion here: https://github.com/BurntSushi/byteorder/pull/70 (of which, I am still on the hook…)
I think the TL;DR is that nobody seems to be sure whether its UB or not, but for now, we should probably take the conservative route and mask out the signaling bits. If we get a definitive answer in the future then sNaNs are not UB, then we could remove the mask.