This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [3.2, mainline] C++ ABI? Wrong passing of class argument in openoffice
- From: Jan Hubicka <jh at suse dot cz>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Jan Hubicka <jh at suse dot cz>,"gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>,"rth at cygnus dot com" <rth at cygnus dot com>, "aj at suse dot de" <aj at suse dot de>,jason at redhat dot com
- Date: Tue, 3 Sep 2002 20:05:41 +0200
- Subject: Re: [3.2, mainline] C++ ABI? Wrong passing of class argument in openoffice
- References: <20020903153632.GD32650@kam.mff.cuni.cz> <16360000.1031068317@warlock.codesourcery.com>
>
>
> --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