Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hplabs!pyramid!csg From: csg@pyramid.pyramid.com (Carl S. Gutekunst) Newsgroups: comp.sys.pyramid Subject: Re: Pyramid's "non-standard" C compiler Keywords: cc C Message-ID: <79432@pyramid.pyramid.com> Date: 1 Aug 89 16:28:11 GMT References: <235@massey.ac.nz> Organization: Pyramid Technology Corp., Mountain View, CA Lines: 13 In article <235@massey.ac.nz> K.Spagnolo@massey.ac.nz (Ken Spagnolo) writes: >I refer to the fact that in Pyramid C, given 'struct x x;', a call to >function y() like 'y(x);' will pass to y() the entire structure x, rather >that just a pointer to x.... Nope. Go to the back of the class. If you want to pass a pointer to a struct, you have to take its address with the '&' operator. That *is* standard C. (See K&R section 6.2, and the C Reference Manual section 7.1.) "Old" K&R implemen- tations will flag an error if you pass the structure directly; these days that means my PDP-11, my Cromemco Z80, and not much else. All modern C compilers copy and pass the structure.