Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Doesn't need to be UB, you can write expressions like: "some_s8_var < some_u32_var" and people will be had. Note that is not the same as "some_s8_var < some_u8_var".

-Wextra catches stuff like this, alas I know of a few people that think "-Wextra is evil" (even though annoying warnings can be selectively disabled)



Fair enough. Given that things like `if (uid = 0) {}` can become a privilege escalation in the right context, surely code that takes the opposite branch of what it looks like is also dangerous in the wrong hands.

I still remember being expected to pass -Wpedantic (and probably also -Wextra) in university.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: