This is the mail archive of the gcc@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: mutually-recursive types and an old puzzle


I wrote:
> >> Here's one, if anyone's curious.  The class has one member, which is
> >> a function pointer; the operator() overload calls the function pointer.

Zack Weinberg wrote:
> > This works, but doesn't get optimized down to ideal code, mainly
> > because the ABI prevents FsmState from being returned in a register
> > (since it's not a POD structure).

On Thu, Jul 01, 2004 at 04:32:01AM +0200, Gabriel Dos Reis wrote:
> That happens only with broken psABIs like Sparc-v7 or x86.
> That has nothing to do with being a POD or not.  The generic
> ABI requires passing the object on  stack only if they
> have a non trivial copy-constructor or destructor. FsmState
> does have trivial copy constructor and destructor.

ABIs that don't allow most STL iterators to be returned in a register
are, IMHO, broken.  Unfortunately, it appears that we are stuck with
some broken ABIs.



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