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: [3.2, mainline] C++ ABI? Wrong passing of class argument in openoffice


> 
> 
> --On Tuesday, September 03, 2002 05:36:32 PM +0200 Jan Hubicka <jh@suse.cz> 
> wrote:
> 
> >Hi,
> >compiling openoffice for -mcpu=i486 dies on interesting problem.
> 
> I added Jason to the cc list; he's been mucking with these bits recently.
> 
> >Does the attached patch look sane?
> 
> You have to worry about variable-sized types, too, I think.

Why? I think C++ objects are never variable sized or am I wrong?
Different code path is used for variable sized arguments.
Push is never used for these and instead the arguments are memcpyied
into preallocated block.

Looking at the code it trust the expr_size_in_bytes then too.
> 
> I think the real problem is expr_size_in_bytes not doing the right thing
> for C++.  It's having a hard time knowing whether the value is a complete
> object or not, and whether it should be treated like one or not.  I'm not
> sure if there's going to be enough information there to figure out what to
> do or not.

You mean that you are unsure whether there is enought information to
copy the argument into stack?  That sounds strange. Somehow it must be
doable.

Honza
> 
> If, as I've suggested earlier, we actually had two different types for
> classes, we could give expressions the right type, and then we would
> -- 
> 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]