[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: RTTI / dynamic casts in KDE?
From:       Manuel Arriaga <m.arriaga () ip ! pt>
Date:       2002-01-28 21:47:49
[Download RAW message or body]

Hi Waldo, David,

Thank you both for your replies.

On Monday 28 January 2002 20:43, David Faure wrote:
> On Monday 28 January 2002 21:32, Waldo Bastian wrote:
> > On Monday 28 January 2002 11:07 am, Manuel Arriaga wrote:
> > >
> > > I would like to know why this option is always used. Is it a g++/libg++
> > > problem? Or KDE "policy"? :-)
> >
> > It's KDE policy. Qt/Embedded usually gets compiled without rtti. Since we
>
> want
>
> > to be able to use parts of KDE with Qt/Embedded as well, that means we
> > can't use rtti in those parts. rtti is also not reliable in combination
> > with dynamically loaded code. Therefor the use of rtti is discouraged.
>
> I think this is wrong. We use RTTI in KDE itself, there's no reason we
> would prevent others from doing so too !

I just noticed that, from all the matches I saw when running

$ grep "-fno-rtti" kdelibs-2.2.2/*

, the only match in the actual toplevel Makefile is

USE_RTTI =

I don't know what this means, but I suppose that if no rtti option is passed 
to GCC then RTTI will be used. (Just guessing :-) )

But I would be interested in knowing more about what Waldo mentioned: that 
"rtti is not reliable in combination with dynamically loaded code". Does this 
mean that using RTTI inside a shared library isn't a good idea (as it seems 
to happen with kdelibs??)? Or that RTTI shouldn't be used in programs which 
link against shared libraries at runtime? Or both?

Thank you for any further input.

Cheers,

Manuel
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic