Switch in a loop

With yestarday’s CVS head of ROOT I’ve noticed one tutorial was broken. Something wrong with switch statement placed inside for loop (it was OK before, the same tutorial worked). See attachment (this is an excerp from one of original ROOT’s tutorial).
laja.C (321 Bytes)
laja.C (321 Bytes)

Hi,

Indeed, I can reproduce this problem. We’ll check into it.
Note that disabling the bytecode compiler works around the problem (.O 0)

Thanks for reporting this problem,
Philippe

[quote]
Note that disabling the bytecode compiler works around the problem (.O 0)
Thanks for reporting this problem,
Philippe[/quote]

Hi, Philippe.

There is another simple workaround do not merge cases :

switch(i)
{
case 0:
std::cout<<“0\n”;
break;
case 1:
std::cout<<“1\n”;
break;
default:
////
}

Fixed in the CINT repository with revision 1883.

This will be uploaded to the ROOT repository in the near future.

Thank you for reporting this problem!

The fix is also in the trunk of the ROOT svn repository.

Cheers,
Philippe