Sorry, I don’t see any aliasing in the code presented by `e`. The float value 
is copied into an array of uint8 and there is no sharing of memory. It would be 
different is one had used pointers, of course.

But, with unions, you have an aliasing as two fields refer to the same address 
in the union. Modifying one, automatically modifies the second (which is the 
intended purpose). So, unions are in fact theoretically less safe than cast on 
values which have only a local action.

Of course, this is seldom a problem as we are supposed to know what we are 
doing when using unions. 

Reply via email to