This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Switching the default for -fabi-version
- From: Michael Matz <matz at suse dot de>
- To: Joe Buck <jbuck at synopsys dot com>
- Cc: Mark Mitchell <mark at codesourcery dot com>, <gcc at gcc dot gnu dot org>,<david dot moore at intel dot com>
- Date: Wed, 22 Oct 2003 15:02:02 +0200 (CEST)
- Subject: Re: Switching the default for -fabi-version
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.