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

How do old-school C programmers ensure they don't accidentally use = when they mean == ?

By making the constant the expression's lvalue. But they don't have to do this anymore; gcc warns when you accidentally use = instead of == now.



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

Search: