http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49165
--- Comment #15 from Vijay Rao 2011-05-27 22:19:00
UTC ---
Ok, thanks for this. While using 4.5.1 I'm also stuck in a toolchain using
3.4.6 for which the latter doesn't fail when one of the conditional args is of
type bool but does give the "void
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49165
--- Comment #11 from Vijay Rao 2011-05-27 07:58:25
UTC ---
Does this fix the situation when the 2nd operand of the conditional operator is
of type int?
extern "C" void abort ();
int bar (bool x, int y)
{
if (y < 10 && (x ? 1 : throw 1))
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49165
--- Comment #1 from Vijay Rao 2011-05-25 18:34:31
UTC ---
/tmp/redux.cc
#include
#include
int main(int argc,char**argv)
{
std::string str;
for ( int field(0);
(field<10) && ((std::cin>>str)? 1 :(throw std::string("failure")));
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49165
Summary: ICE on for-loop/throw combination
Product: gcc
Version: 4.5.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassig...@gcc.gnu
--- Comment #4 from gcc at portuosus dot com 2009-09-02 06:48 ---
redux2.cc (and actual code from which it was derived) works with 3.4.6 and
4.1.2 and 4.4.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41223
--- Comment #3 from gcc at portuosus dot com 2009-09-02 06:44 ---
My bad.
redux2.cc *does* work in the actual code from which it was reduced.
--
gcc at portuosus dot com changed:
What|Removed |Added
--- Comment #2 from gcc at portuosus dot com 2009-09-02 06:15 ---
This works in 4.4.1 and 3.4.6 and 4.1.2:
//redux2.cc
#include
#include
struct C
{
template class Container >
void member_template(Contai
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc at portuosus dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41223