@dave_andersen it's always strict aliasing
Conversation
Notices
-
Embed this notice
John Regehr (regehr@mastodon.social)'s status on Wednesday, 13-Nov-2024 03:04:25 JST John Regehr -
Embed this notice
pinskia (pinskia@hachyderm.io)'s status on Wednesday, 13-Nov-2024 03:04:24 JST pinskia @regehr @dave_andersen Interesting that `-fno-strict-aliasing` does NOT fix it for clang ...
-
Embed this notice
pinskia (pinskia@hachyderm.io)'s status on Wednesday, 13-Nov-2024 03:05:33 JST pinskia @regehr @dave_andersen Oh wait it is more complex, sizeof(long) != sizeof(float) and clang says the upper bits are undefined then ...
-
Embed this notice
pinskia (pinskia@hachyderm.io)'s status on Wednesday, 13-Nov-2024 03:10:01 JST pinskia @regehr @dave_andersen Well this originally was DOS, so maybe int was 2 bytes (16bits). It has been a long time since I have looked into (non-32bit) DOS programming.
-
Embed this notice
John Regehr (regehr@mastodon.social)'s status on Wednesday, 13-Nov-2024 03:10:02 JST John Regehr @pinskia @dave_andersen I find "long" to be a weird choice in the original code, I wonder why they used that instead of int?
-
Embed this notice
John Regehr (regehr@mastodon.social)'s status on Wednesday, 13-Nov-2024 03:10:03 JST John Regehr @pinskia @dave_andersen yeah.. you have to also make i a 32-bit type instead of a 64-bit type (but long was 32 bits at the time this code was written, so that's reasonable)
-
Embed this notice