|[15 earlier articles]|
|Re: C as assembly language email@example.com (2001-04-15)|
|Re: C as assembly language firstname.lastname@example.org (Jim Granville) (2001-04-18)|
|Re: C as assembly language email@example.com (Joachim Durchholz) (2001-05-03)|
|Re: C as assembly language firstname.lastname@example.org (Joachim Durchholz) (2001-05-07)|
|Re: C as assembly language Hans_Boehm@hp.com (Hans Boehm) (2001-05-07)|
|Re: C as assembly language email@example.com (2001-05-13)|
|Re: C as assembly language firstname.lastname@example.org (David Thompson) (2001-05-15)|
|Re: C as assembly language email@example.com (2002-03-31)|
|From:||"David Thompson" <firstname.lastname@example.org>|
|Date:||15 May 2001 00:32:54 -0400|
|References:||01-03-006 01-03-046 01-03-130 01-04-027 01-04-052 01-05-021|
|Posted-Date:||15 May 2001 00:32:54 EDT|
Joachim Durchholz <email@example.com> wrote :
[ returning a struct from a function in C, possibly in registers ]
> 3) What should the caller do with a struct from a result? You can't
> assign it to another struct in C. You can't even take its address. All
> you can do with it is (a) select a member from it (which essentially
> means you're back at a single result) and (b) pass it to another
> function ...
You certainly can assign it -- that's normally the reason
people use a struct return type (to return multiple values),
even on system that don't or can't put it in registers.
You can't take the address of a non-lvalue whether
implemented in register(s) or not.
- David.Thompson 1 now at worldnet.att.net
Return to the
Search the comp.compilers archives again.