gcc -Woverloaded-virtual

David Faure faure at kde.org
Tue Nov 27 16:23:53 GMT 2007


On Tuesday 27 November 2007, Aurélien Gâteau wrote:
> David Faure wrote:
> 
> > On Tuesday 27 November 2007, Aurélien Gâteau wrote:
> >> David Faure wrote:
> >> 
> >> >> Adding a new virtual method to a class is not binary compatible, but
> >> >> reimplementing an existing virtual method is binary compatible, or am
> >> >> I wrong? In this case we don't need to keep the method.
> >> > 
> >> > It's BC but old programs that haven't been recompiled will not call the
> >> > reimplementation if we re-add it later.
> >> > So I would rather leave it, for symmetry with addSubjob being
> >> > reimplemented.
> >> 
> >> This is true if the program instantiates the class itself, but in the
> >> case of jobs, they are instantiated by the kio libraries, so I guess the
> >> job instances would always have up-to-date virtual tables.
> > 
> > Well, I was thinking about jobs implemented out of kdelibs, e.g. KMail has
> > imap-related jobs that derive from KIO::Job, KIO::SpecialJob, etc. and it
> > does call addSubjob/removeSubjob.
> 
> Oh I see.
>  
> >> On the other hand I see your point about keeping the symetry. And you
> >> know this code much better than me, so it's your decision.
> >> 
> >> I can commit the second version of my patch if you want, but I don't feel
> >> like doing the other changes we discussed myself, because I don't have a
> >> complete KDE checkout.
> > 
> > I'll do it then, no problem.

Patch attached. Seems to work fine. But it's BIC so it'll have to wait until Monday....

Apps not recompiled get for instance:
/d/kde/inst/kde4/lib/libkonq.so.5: undefined symbol: _ZN3KIO3Job9addSubjobEPS0_b
... even though libkonq doesn't call addSubjob; but it has that in the jobs virtual tables I guess.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kio.diff
Type: text/x-diff
Size: 4057 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071127/16d4506a/attachment.diff>


More information about the kde-core-devel mailing list