This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++ ABI Issues

Joe Buck <> 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]