A lot of the problems are due to the assumption an integer is big enough to store a pointer.
Just wondering: is there a way to make the compiler barf if such an assignment is done? Or for generating a runtime error if the assignment doesn't fit?
A lot of the problems are due to the assumption an integer is big enough to store a pointer.
Just wondering: is there a way to make the compiler barf if such an assignment is done? Or for generating a runtime error if the assignment doesn't fit?
If you never acquire the habit of writing sloppy code and ignoring warnings, it's not even that bad. In fact, it's only the kids who already know C coming in who complain about the stricter flags.
Comparing capabilities of PVS-Studio and Visual Studio 2010 in detecting defects in 64-bit programs - http://www.viva64.com/en/a/0066/
64 bits, Wp64, Visual Studio 2008, Viva64 and all the rest - http://www.viva64.com/en/a/0021/
Used to be (old guy talking) 'int' meant 'register size' so on a 64-bit target it whould be 64 bits. Whereupon all the 'bugs' evaporate.