RE: Recent changes in rootcint.cxx

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Thu, 01 Feb 2007 16:02:34 -0600


Hi,

Due to a weakness in CINT (privacy level of nested class is hard to get to), I re-instated the '#define private public' trick which is still required to properly deal with nested private and protected classes ...

This will stay as is until CINT has been fully upgraded to use Reflex.

Cheers,
Philippe.

-----Original Message-----
From: Constantin Loizides [mailto:loizides_at_MIT.EDU] Sent: Wednesday, January 31, 2007 5:54 PM To: Philippe Canal
Cc: 'ROOT TALK'
Subject: Re: [ROOT] Recent changes in rootcint.cxx

Hi Phillippe,

I made an example for you based on a stripped down version of the class I reported the problem with and using the $ROOTSYS/test environment.

Constantin

Philippe Canal wrote:
> Hi Constantin,
>
> Can you please send a succint example reproducing the problem?
>
> Thanks,
> Philippe.
>
> -----Original Message-----
> From: owner-roottalk_at_pcroot.cern.ch [mailto:owner-roottalk_at_pcroot.cern.ch]
> On Behalf Of Constantin Loizides
> Sent: Wednesday, January 31, 2007 12:36 PM
> To: ROOT TALK
> Subject: [ROOT] Recent changes in rootcint.cxx
>
> HI,
>
> recently none of my projects compiles anymore with ROOT head, nothing was
> changed
> than updating ROOT to the latest cvs (as of now).
>
> The compilation fails in the rootcint generated code segments, like in
>
> >g++ -g -I. --ansi -Wall -Wno-long-long -Wno-strict-aliasing -Df2cFortran
> -D_GNU_SOURCE -Iinclude
> >-I/opt/root/root_head/include -DHAVE_CERNLIBS -o
> genherwig/bld/G__genherwig.o -c genherwig/G__genherwig.cxx
> >./genherwig/THIHerwigBase.h:27: error: 'template<class T> struct
> THIHerwigBase::IE_t' is protected
> >genherwig/G__genherwig.h:55: error: within this context
>
> where
>
> class THIHerwigBase : public THIGenerator {
> protected:
>
> template<typename T = Int_t>
> struct IE_t { /*IndexElement*/
> public:
> UInt_t fIndex; //index in common block
> T fVal; //corresponding value
> IE_t(UInt_t i=0, T v=0) : fIndex(i),fVal(v) {}
> virtual ~IE_t() {}
> ClassDefT(IE_t,1) // Generic parameter given by an index (in common
> block)
> };
> // and so on
> }
>
> After a bit of research I figured out that in
>
http://root.cern.ch/viewcvs/utils/src/rootcint.cxx.diff?r1=1.251&r2=1.252&so
> rtby=date
> a change was performed to not brutally overwrite protect and private with
> public,
> but rather to keep the access pattern assigned by the programmer. This of
> course
> is great, but seems not work:
>
> The login message says:
> "Remove the #define private public since it is no longer used (we
> really on the Shadow classes to replace this technique)."
>
> What are those Shadow classes? Am I supposed to write some code
> to support the new feature?
>
> Please let me know asap, since lots of code fails to compile and I need
> to understand the change in HEAD before I can adapt our projects.
>
> Thanks,
> Constantin
>

-- 
Tel: +1-617-8301823 (SkypeIn)
Skype: loizides
AOL: ConLoi / ICQ: 114824520
Received on Thu Feb 01 2007 - 23:04:19 CET

This archive was generated by hypermail 2.2.0 : Fri Feb 02 2007 - 05:50:01 CET