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

Isn't that pretty much the definition of a warning? An expression that is technically valid, but probably a mistake. If something wasn't a valid expression, it would be a compiler error, not a warning.


Usually, yes. C is weird because undefined behavior is illegal, can sometimes be detected statically, and yet will not produce an error. So sometimes you get warnings for invalid yet error-free code. It’s a strange language.




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

Search: