News for hackers. Stuff that matters.
Re:“Unexplainable” core dump (2011) by BHSPitMonkey on Tuesday January 03, 2023 @11:18PM (#34242005)
I think the key word here is "silently"; It would be one thing if the compiler informed the developer it was going to skip a statement (and said "if you really want this statement kept in, add a preprocessor directive here")
Re:“Unexplainable” core dump (2011) by tialaramex on Wednesday January 04, 2023 @05:57AM (#34244193)
Redundant NULL checks happen all over the place. So the result of your revised requirement would be a huge pile of useless diagnostics. Whereupon, as with similar diagnostics C++ programmers demand a way to switch them off because they're annoying, then they're back to being annoyed that the compiler didn't do what they expected.