[Bug c++/49165] ICE on for-loop/throw combination
gcc at portuosus dot com
gcc-bugzilla@gcc.gnu.org
Wed May 25 18:43:00 GMT 2011
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.
More information about the Gcc-bugs
mailing list