Pyramid's "non-standard" C compiler

Carl S. Gutekunst csg at pyramid.pyramid.com
Wed Aug 2 02:28:11 AEST 1989


In article <235 at massey.ac.nz> K.Spagnolo at 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.

<csg>



More information about the Comp.sys.pyramid mailing list