albertodemichelis / squirrel

Official repository for the programming language Squirrel
http://www.squirrel-lang.org
MIT License
894 stars 148 forks source link

Fix compile error with -Werror=strict-aliasing #257

Open ceeac opened 1 year ago

ceeac commented 1 year ago

Accessing a float by dereferencing an int pointer is UB.

band-a-prend commented 1 year ago

There is another similar issue [1] with sqvm.cpp reported from Gentoo downstream. Could you please look at it too?

[1] https://sourceforge.net/p/codeblocks/tickets/1303/

band-a-prend commented 1 year ago

Sorry, I forgot that codeblocks uses bundled version of squirrel (v3.1) and I have to check at least build of suirrel 3.2 to confirm additional issue.

band-a-prend commented 1 year ago

This proposed patch fixes codeblocks issue related to sqcompiler.cpp file.

albertodemichelis commented 1 year ago

In which situation does this create an issue?