Switching the default for -fabi-version
Michael Matz
matz@suse.de
Wed Oct 22 14:53:00 GMT 2003
Hi,
On Tue, 21 Oct 2003, Joe Buck wrote:
> No objection, though I am still curious as to whether this actually makes
> a difference for any actual, widely used source code out there
Okay someone tested KDE/Qt with -Wabi, and it spits about 300-500 warnings
per compilation unit (!). A common one is about implicit virtual dtors
or something, because we have code in structure like:
class Base { virtual ~Base() {} };
class Derived: public Base { ... no ~Derived(); };
And each qpixmap gives an empty class warning:
"contains empty classes which may cause base classes to be placed at
different locations in a future version of GCC"
A thing stressing C++ quite a bit is aRts, which additionally often gives:
"virtual base is not ABI-compliant and may change in a future version of
GCC."
> (that is, does -Wabi report anything for real programs that aren't
> specially constructed to tweak ABI bugs? How often?)
So, definitely yes. I doubt though, that it matters, because we also link
against libstdc++ (of course), and hence the new compiler anyway means
full recompilation and lost of backward compatibility. I hope that
somewhen this all becomes better, like with glibc ;-)
Ciao,
Michael.
More information about the Gcc
mailing list