parameter adjustment (was double indirection)

der Mouse mouse at mcgill-vision.UUCP
Wed Mar 9 19:54:57 AEST 1988


In article <2305 at umd5.umd.edu>, chris at trantor.umd.edu (Chris Torek) writes:
> In article <16940 at watmath.waterloo.edu> rbutterworth at watmath.waterloo.edu (Ray Butterworth) writes:
>> C performs this "helpful" adjustment of the programmer's
>> misdeclaration with other parameters too. ...
>> sizeof args:   float=8  double=8  short=2  char=1  int[10]=4
>> sizeof autos:  float=4  double=8  short=2  char=1  int[10]=40
>> The "40" vs. the "4" shows the array parameter "adjustment".
> This one is `correct' according to the language definition;
>> And (float) is similarly adjusted form 4 to 8, since it is actually
>> passed as (double).
> but this one is just a bug.

I don't believe I just saw Chris say that.

K&R, page 186, fifth paragraph on that page.

					der Mouse

			uucp: mouse at mcgill-vision.uucp
			arpa: mouse at larry.mcrcim.mcgill.edu



More information about the Comp.lang.c mailing list