Hello Christoph, Please use int G__optimizemode(int optlevel); This can be used both from interpreter and in compiled code(need G__ci.h to be included). Thank you Masaharu Goto >Date: Wed, 8 Aug 2001 16:36:48 +0300 >From: Christoph Bugel <chris@tti-telecom.com> >To: Masaharu Goto <MXJ02154@nifty.ne.jp> >Cc: roottalk@pcroot.cern.ch, rootdev@pcroot.cern.ch >Subject: Re: [ROOT] RE:CINT: extra destructor called > > >Thank you for the tip :) >I activated the optimization 0 like this: > >G__init_cint("cint -O0"); >G__loadfile("test.cc"); >G__calc("func();"); > >and it fixed the problem. >Is it possible to turn this option on at a later time (not during G__init_cint) >with something like G__process_cmd, or similar? (I think with G__calc and >G__exec_text I can use only C++ syntax, not commands) > >Thanks, >Christoph > > >On Wed 2001-08-08, Masaharu Goto wrote: >> Hello Christoph, >> >> Thank you for reporting this problem. >> It turned out that this is a tricky one. I need time to >> think about this. Meanwhile, a workaround is to use optimization >> level 0 '.O0' to turn off bytecode compilation. >> >> Thank you >> Masaharu Goto >> >> >> >Date: Mon, 6 Aug 2001 16:02:58 +0300 >> >From: Christoph Bugel <chris@tti-telecom.com> >> >To: roottalk@pcroot.cern.ch, rootdev@pcroot.cern.ch >> >Subject: CINT: extra destructor called >> > >> >Hi! >> >I found a bug in cint, causing it to call a destructor where it >> >shouldnt. For example, the code below will produce this output: >> > >> >DTOR >> >CTOR >> >DTOR >> > >> >This was tested with cint-5.15.07. >> >BTW, when 'i' is initialized to 3, the output will be 'DTOR' which is >> >also wrong. If 'i' is initialized to 0 it works ok. (CTOR, DTOR). >> >Thanks! >> > >> >here is the code: >> > >> >///////////////////////////////////// >> > >> >class X >> >{ >> > public: >> > X(){ printf("CTOR\n"); } >> > ~X(){ printf("DTOR\n"); } >> >}; >> >void bug() >> >{ >> > int i=0; >> > while(i<5) >> > { >> > if(i==1) >> > { >> > X x1; >> > } >> > i = i + 1; >> > } >> >} >> >
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:56 MET