Getting around the strict aliasing rule in Julia

I misunderstood how the strict aliasing rule works in Julia. The example I had doesn’t break Julia’s aliasing rules because using unsafe_load and unsafe_store! is equivalent to loading and storing with memcpy type punning in C.

The strict aliasing rule would be an issue if the example instead used unsafe_wrap to write to the pointer in unsafe_foo!