I am using xorshift\* to generate random 64 bit numbers and want to use the most significant 32 bits as my output. Is there anything unsafe about just creating a pointer to the most significant bits and returning that value? I know that I could just use a bitshift, but I am hoping to compare that option to this one for performance. I have done basic testing on this method and it seems to work as expected under all g++ optimization levels but I am unsure if it is defined behavior, and if not that it may cause problems as the project develops.

```
uint64_t  seed = 0x2cf915021e8312a0;            // randomly chosen from random.org
uint32_t* seed_msb = (uint32_t*)(&seed) + 1;    // +1 to account for endianness

uint32_t xorshiftStar32(){
    seed ^= seed >> 12;
    seed ^= seed << 25;
    seed ^= seed >> 27;
    return (*seed_msb) * (uint64_t)(0x2545f4914f6cdd1d);
}

```

The testing I have done so far is just checking that each time xorshiftStar32() is called, the seed updates and the function returns the updated result.