Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
brownleej
· 15y ago · 0 comments
I think some compilers give a warning on while(foo = read()) but not on while((foo = read())).
Comments
[–]
CamperBob
15y ago
That would be a broken compiler.
[–]
tbrownaw
15y ago
No, I'm pretty sure that's
intentional
specifically to permit that idiom.
[–]
__david__
15y ago
It's usually a warning that you have to turn on explicitly, or one that you can at least turn off (thank heavens).