Portability of passing/operating on structures...

Mike Hoegeman mh at wlbr.EATON.COM
Mon Oct 17 05:02:32 AEST 1988


 In article <8308 at alice.UUCP> ark at alice.UUCP (Andrew Koenig) writes:
 >In article <8810111934.AA21941 at ucbarpa.Berkeley.EDU>, U23405 at UICVM.Berkeley.EDU (Michael J. Steiner) writes:
 >> Is it considered portable to do the following things with
 >> structures or unions?
 >>     -pass them (by value) to functions
 >Yes.

No

 >>     -have functions which return them
 >Yes.

No

 >>     -assign them (=)
 >Yes.

No

I've worked on alot of machines where you cannot do ANY of the above.
Maybe that's not "right". Maybe one should boycott such compilers. Any
way you look at it though it's still not portable. I would avoid
passing structures by value until more compilers allow this. Right now
there are too many that don't.



More information about the Comp.lang.c mailing list