4 ms·
Why does the compiler not warn if you use a 64 bit unsigned integer when a 32 bit signed integer is required?
by tinus_hn 5y ago
Why does the compiler not warn if you use a 64 bit unsigned integer when a 32 bit signed integer is required?
- technion 5y agoYou actually can pass -Wconversion to a compiler, but it's one of those things that's going to generate a lot of noise and not be a vulnerability 99% of the time. It's not an easy solved problem, because if you annoy developers with noise they stop caring.
- tinus_hn 5y agoIt’s an easily solved problem if you turn on these warnings from the start. It’s not though if your program contains a million of these potential vulnerabilities already. Should we be afraid developers will stop caring? Did they even care in the first place?