User forums > Help
Loss of Data Warning
(1/1)
wolfcry:
Hello,
Not sure if this goes in the bug section or not (most likely a setting I changed without realizing) but C::B is no longer issuing me warnings about possible loss of data due to unsafe conversion types (eg. double to int conversion etc.) and I could have sworn it did before I went to 10.5.
I checked the compiler flag options in the Settings >> Compiler and debugger section and I do have enable all compiler warnings checked as well as all other warning options checked (over-the-top I know but I'm extremely picky about clean code).
I tested my compiler (Mingw-g++) using a different IDE and it kicks the warning out like it was supposed to so I know it's not that. Just not sure where in C::B this is being filtered out.
For example, this tid bit should kick out the warning like it does with the other IDE but it doesn't:
--- Code: ---double a = 8.5;
int d = a;
--- End code ---
C::B version and OS is in my sig as always.
stahta01:
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
Edit: Only compare a re-build to a Re-Build; never a build to a build.
wolfcry:
Hey Stahta01 and thanks for the help.
I'm not exactly sure why (unless updating C::B erased my additional option settings), but the other options (including Wconversion which should be a default option flag in C::B or at the very least, an option you can set), were gone.
I had already viewed the build log before posting (and was mistakingly thinking another option was the flag I was looking for lol) but didn't realize -Wconversion was missing until looking over the log for the umpteenth time :? Oi is all I can say about that one lol.
For those new to C::B and for those that want this warning, you set the -Wconversion flag at (hopefully this helps):
Settings >> Compiler and debugger >> Other Settings (tab directly to the right of Compiler Flags tab).
Navigation
[0] Message Index
Go to full version