Path: utzoo!utgpu!water!watmath!clyde!rutgers!cmcl2!nrl-cmf!ames!pasteur!ucbvax!sdcsvax!ucsdhub!hp-sdd!hplabs!sdcrdcf!ism780c!nobody From: nobody@ism780c.UUCP (Unprivileged user) Newsgroups: comp.lang.c Subject: Re: what C needs Message-ID: <8631@ism780c.UUCP> Date: 18 Jan 88 21:54:00 GMT References: <8712241909.AA03710@decwrl.dec.com> <6926@brl-smoke.ARPA> <496@doug.UUCP> <6995@brl-smoke.ARPA> <1128@jenny.cl.cam.ac.uk> <7116@brl-smoke.ARPA> Reply-To: marv@ism780.UUCP (Marvin Rubenstein) Organization: Interactive Systems Corp., Santa Monica CA Lines: 23 In article <7116@brl-smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: >In article <1128@jenny.cl.cam.ac.uk> am@cl.cam.ac.uk (Alan Mycroft) writes: >-What about a machine which initialises its stack with parity errors >-... How about >- f2() { struct { char a; int b; } x; >- x.a = 1, x.b = 1; >- g2(x); >- } > >The implementation is not allowed to cause a trap when passing x to g2(). >If it wants to flag holes specially so they cause a trap when touched, >then it will have to pass struct arguments member-by-member. Another thing that a legal implementation may do is to generate code to assign to the pad bytes (if any) when a reference to a near by variable is incountered. For example the assignemt: x.a = 1; may fill the pad that exists between x.a and x.b. For most machines this no more costly than leaving the pad bytes undefined. Marv Rubinstein -- Interactive Systems