Comment by raverbashing
3 years ago
If it's wrong break on compiler time, not on run time
The problem is the compiler going implementation defined on the multiplication/assignment then going all language lawyer on the following line and blaming the user
> In general, addition like 'a + b' also isn't safe in C.
Cool, another reason to retire it
> If it's wrong break on compiler time, not on run time
The number being multiplied isn't known until runtime, so there's not a good way of doing this.
Well, funny that the compiler sees no problem in removing a check (on compile time) of a value that is totally possible to obtain, on runtime
Isn’t the very base issue the program didn’t sanitize the input?
Just blindly accepting user input is universally bad methinks.
2 replies →