Mail Archives: djgpp/1998/05/16/10:30:31
Paul Derbyshire wrote:
>
> I suppose objects bigger than 32 bits are implicitly passed by reference using
> a pointer in eax, and the temporary is deleted only after receipt of the value
> in the caller?
I think that's correct. However, if memory serves, such structs are not
returned by reference but by value; a separate copy is placed on the
stack and its address is returned in eax. If this is correct, then your
huge class might cause a stack overflow if you tried to return it by
value. The best way to find out is probably to compile such code with
the -S flag and examine the resulting assembly.
--
---------------------------------------------------------------------
| John M. Aldrich |"Men rarely (if ever) manage to dream |
| aka Fighteer I |up a god superior to themselves. Most |
| mailto:fighteer AT cs DOT com |gods have the manners and morals of a |
| http://www.cs.com/fighteer |spoiled child." - Lazarus Long |
---------------------------------------------------------------------
- Raw text -