This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ ABI Issues
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Joe Buck <Joe dot Buck at synopsys dot com>
- Cc: phil at jaj dot com (Phil Edwards), mark at codesourcery dot com (Mark Mitchell), gcc at gcc dot gnu dot org
- Date: 28 Aug 2002 07:24:36 +0200
- Subject: Re: C++ ABI Issues
- Organization: Integrable Solutions
- References: <200208272246.PAA00056@atrus.synopsys.com>
Joe Buck <Joe.Buck@synopsys.com> writes:
| > | The compiler can warn that gcc 3.2 and a compiler that implements the ABI
| > | document correctly will lay out a class differently. But given this
| > | knowledge, how is it supposed to figure out what the user wants to happen?
| > | It doesn't know which compiler compiled the "other half" of the code: the
| > | library being called, or the caller of the library.
|
| > Aren't we talking of a bug in GCC -- which other compilers known to
| > implement the ABI don't have?
|
| It's a bug in GCC, yes. Given the presence of that bug, what should a C++
| software developer do? He or she has no choice but to use padding.
I'm not convinced. We're not talking of abstract bugs. We do know
what they are and how we diverge from other implementors (they got it
right). So, we're talking of a bug compared to ABI correct
implementation, so we know what the fix should be.
| > | You appear to assume that these padding objects will be needed all over
| > | the place.
| >
| > No. I'm not comfortable with using warts and code uglification to try
| > to do the compiler's work. We do know the bugs we're talking about.
|
| Do you intend to implement time travel and go back and fix GCC 3.2?
I assume that isn't a question that asks for a sensical answer, right?
| If
| not, what advice do you want to give to users, who might need both
| compilers, or gcc 3.2 plus future, fixed gcc's, to work and to talk to
| each other?
The future fixed GCC is where there is a possible divergence from
GCC-3.2. That future GCC ought to know about the fix -- since it will
lay out differently compared to GCC-3.2. That future GCC-3.2 can add the
missing bits if necessary.
| You appear to be focussed only on fixing C++ libraries we
| ship (libstdc++).
As you certainly read in my previous messages, I'm certainly worrying
about libraries and programs other than libstdc++.
[...]
| Your answer
| appears to be, um, what? Punt, saying that you're not comfortable with
| code uglification?
That is a mischaracterization of my answer.
-- Gaby