This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ABI Issues: C++ PATCH: PR 12053
On Thu, Sep 04, 2003 at 04:45:25PM -0700, Mike Stump wrote:
> Odd, you only test what people don't use, and don't test what people do
> use. Maybe that is backward. Imagined compatibility isn't more
> important than real compatibility.
That's why some of us pushed for -Wabi, with the goal that the compiler
would warn about all constructs known to cause ABI compatibility problems.
Since these problems are discovered as time goes on, the user would have
to run a -Wabi analysis with the newest available compiler.
At least this allows users to determine whether they are likely to run
into trouble. In practice, seeing that almost all the problems found so
far relate to bitfields and inheritance, I would avoid giving the compiler
any chance to mess up here, by avoiding leaving any sub-byte padding (or,
to be safer, sub-word padding) at the end of a class that is likely to be
derived from.