This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: KDE hackers, please read (was [nathan@codesourcery.com: Re: GCC 3.0.3: Bugs to Fix]) (fwd)


On Mon 10. December 2001 09:39, Simon Hausmann wrote:
[snip]
>
> The regular expression editor is one example (it is loaded
> dynamically in khtml/kate/klipper, exactly like in 3993) , some of
> the texteditor interfaces in kdelibs/interfaces another one. If we
> don't want to use RTLD_GLOBAL I see too solutions from our side:
>
> 1) Use intermediate shared libraries. Like the regular expression
>    editor component gets another shared library to which all apps
>    using the component would have to link against. This doesn't
>    scale very well for a big amount of components.
>
> 2) Don't use C++ RTTI to determine whether the given object inherits
>    from the pure base class but use Qt RTTI instead (qt_cast) .
>    Syntactically not as beautiful (we could hide it behind a d-cast
>    like template though) it does quite the same job as when C++ rtti
>    falls back on the string comparison approach. (which while being
>    slower should still be fine for KDE as we usually don't do that
>    casting in inner loops or other time critical places - I think
>    functionality is here more important)
>

 Maybe I'm missing something obvious, but how about this one?
   3) Persuade gcc folks to add compiler switch that makes gcc use string 
comparing when doing rtti, and simply compile whole KDE with this switch 
turned on.

 It seems to be very similar to 2), with some advantages, like working also 
for classes not inheriting from QObject without problems. Also whether 
dynamic_cast etc. uses just pointer comparing or string comparing 
shouldn't(?) affect the ABI, so I don't see any serious problem with it.

-- 
 Lubos Lunak
 llunak@suse.cz ; l.lunak@kde.org
 http://dforce.sh.cvut.cz/~seli


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]