This is the mail archive of the gcc-patches@gcc.gnu.org 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: Fix c++ ABI failures


> Still, the question is how should be classes with non-trivial
> constructors or destructors passes on sparc64, ia64 and other ABIs which
> pass records in registers.

The IA64 C++ ABI is very clear about this.  It says, essentially:

  If you have a non-trivial copy constructor or destructor, you pass in
  memory.

  Otherwise, you do whatever you would have done in C for an equivalent
  structure.

That seems to make sense to me -- independent of the architecture.  Are
you disagreeing?

Note that this is also what G++ has always done -- except that on some
architectures G++ passed in memory even in cases where C would have
passed in registers.  (That's what David and I just fixed.)

The change just makes C++ more like C.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


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