Hello Rene, and Chris, Thank you for reporting this problem. Problem occurs at **c=3. I'll fix this problem in next release. Masaharu Goto >Date: Mon, 25 Feb 2002 07:48:50 +0000 >From: Rene Brun <Rene.Brun@cern.ch> >To: cint@pcroot.cern.ch >Subject: [CINT] [Fwd: [ROOT] cint bug: a[i][j]*a[i][j]] > >Hi Masa, > >Another mail that was posted to roottalk 2 weeks ago > >Rene >----------------------------------------------------------------------------- - -- >Date: Fri, 15 Feb 2002 15:25:28 -0500 >From: Chris Crawford <chris2@lns.mit.edu> >To: roottalk@pcroot.cern.ch >Cc: chris2@lns.mit.edu >Subject: [ROOT] cint bug: a[i][j]*a[i][j] > >i would like to report a couple of eccentric bugs in cint 5.15.20 >illustrated by the following code "err.c": > >float sub(float** a) {return a[0][0]+a[0][0];} >void err() { float **b = new float*; *b= new float(2.); > for(int i=0;i==0;i++) { printf("%f\n",sub(b)); }} >void er2() { float **c = new float*; *c= new float; **c=3.; > for(int i=0;i==0;i++) { printf("%f\n",sub(c)); }} > >err() reports the error "Error: +" but still seems to work. it does so >with either 'new' or 'malloc', only inside a 'for' or 'while' loop, >which calls 'a[0][0]+a[0][0]' from a function. using '**a + **a' won't >report an error. > >er2() crashes at **c=3, only when followed by the next line. > >any thoughts??? >--Chris Crawford > >
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:43 MET