Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ucbvax.ARPA Path: utzoo!utcs!lsuc!pesnta!amd!dual!ucbvax!info-vax From: info-vax@ucbvax.ARPA Newsgroups: fa.info-vax Subject: Re: DEC C compiler Message-ID: <4940@ucbvax.ARPA> Date: Tue, 19-Feb-85 17:29:07 EST Article-I.D.: ucbvax.4940 Posted: Tue Feb 19 17:29:07 1985 Date-Received: Wed, 20-Feb-85 04:17:33 EST Sender: daemon@ucbvax.ARPA Organization: University of California at Berkeley Lines: 27 From: Rudy.Nedved@CMU-CS-A.ARPA We have X2.0 DEC C compiler....not eunice compiler. The compiler will take the following program: foo(arg) { int *p; p = &arg; printf(*p,*(p+1)); } main() { foo("here %s\n","it is"); } and instead of getting the actual calling stack address (stored above the return address) of the first arg...it will give me the address of a copy....so the result will be instead of here it is I will get here where garbage is a string print out of some bad pointer...which in reality is the location after the copied stack value...which is random...may even be p itself since it is allocated next in the routine locals. Check itout.. use CC /MACHINE/LIST and see for your self. -Rudy