Y
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
CamperBob
5636 days ago
That would be a broken compiler.
link
tbrownaw
5636 days ago
No, I'm pretty sure that's
intentional
specifically to permit that idiom.
link
__david__
5635 days ago
It's usually a warning that you have to turn on explicitly, or one that you can at least turn off (thank heavens).
link