I had an old TODO item to look into other possibly-useful compiler warnings to add to the project. This adds two such warning flags, one of which is fairly broad: -Wshadow and -Wconversion.
-Wshadow warns if one variable shadows one with a greater scope, and -Wconversion warns for all number of potentially unintended implicit conversions (between 32- and 64-bith precision, between real and integer, between signed and unsigned, truncation, etc.)
Note: do not merge this, I've opened it against a non-develop branch in order to get a cleaner diff (the hash token code is what finally pushed me to look into conversion warnings).
I had an old TODO item to look into other possibly-useful compiler warnings to add to the project. This adds two such warning flags, one of which is fairly broad:
-Wshadow
and-Wconversion
.-Wshadow
warns if one variable shadows one with a greater scope, and-Wconversion
warns for all number of potentially unintended implicit conversions (between 32- and 64-bith precision, between real and integer, between signed and unsigned, truncation, etc.)Note: do not merge this, I've opened it against a non-
develop
branch in order to get a cleaner diff (the hash token code is what finally pushed me to look into conversion warnings).