top | item 17817136

(no title)

gshrikant | 7 years ago

I'm curious, AFAICT Linux uses -fno-strict-aliasing with GCC which promises not to enable strict aliasing based optimizations even at higher optimization levels. But they also rely on the GCC blessed behavior of union based type punning which is redundant in that case.

I suppose union based type punning makes the intent a little clearer (vis a vis memcpy) but that's a weak argument at best.

discuss

order

saagarjha|7 years ago

> I suppose union based type punning makes the intent a little clearer (vis a vis memcpy) but that's a weak argument at best.

How much more explicit can you get than a memcpy?

gshrikant|7 years ago

I meant the fact that you're actually reinterpreting bits and not really copying them somewhere.