http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49165
--- Comment #1 from Vijay Rao <gcc at portuosus dot com> 2011-05-25 18:34:31 UTC --- /tmp/redux.cc #include <iostream> #include <string> int main(int argc,char**argv) { std::string str; for ( int field(0); (field<10) && ((std::cin>>str)? 1 :(throw std::string("failure"))); field++ ); } g++ /tmp/redux.cc /tmp/redux.cc: In function ‘int main(int, char**)’: /tmp/redux.cc:8:65: error: void value not ignored as it ought to be This bug looks a lot like what I reported some years ago: This: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14083 shows that it should be accepted by the compiler.