Hacker News new | ask | show | jobs
by brownleej 5636 days ago
I think some compilers give a warning on while(foo = read()) but not on while((foo = read())).
1 comments

That would be a broken compiler.
No, I'm pretty sure that's intentional specifically to permit that idiom.
It's usually a warning that you have to turn on explicitly, or one that you can at least turn off (thank heavens).