Curly bracket counting in 5.17.03

Hi,

The very short macro below reports
Error: Too many '}'
in line 19?

the problem appears in 5.17.03,
there is no problem in 5.16.00.
I checked the commits for 5.17.04 but only found a fix
related to ‘dangling parentheses’ which is probably not the
issue here?

Thanks,
Gerhard

{
  Int_t nlines     = 10;
  Int_t ntypesmax  = 50;
  Int_t condition1 =  0;
  Int_t condition2 =  1;

  for (Int_t i = 0; i < nlines - 1; i++) {
    Int_t StringExists = 0;
    for (Int_t j = 0; j < ntypesmax; j++) {
      if (condition1) {
	StringExists = 1;
      }
    }
    if (StringExists) {
      continue;
    } else {
      for (Int_t j = 0; j < ntypesmax; j++) {
	if (condition2) {
	  break;
	}
      }
    }
  }
}

Hi Gerhard,

I can reproduce it; I’m debugging it. Thanks SO much for reporting - what a horrible bug! I’ll let you know when it’s fixed.

Axel.

Hi,

this is a bit more complex than I was hoping. It’s a side effect of CINT’s efforts to optimize the code; if you type “.O0” before running the script it will succeed. I will try to fix it for the production release in December.

Cheers, Axel.

Hi Gerhard,

this has been fixed.

Cheers, Axel.