Can the address of a variable change during a function?

Joe Buck jbuck at epimass.EPI.COM
Tue Nov 22 03:24:15 AEST 1988


In article <8938 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
>>In this case, the behavior of the program will be *very*
>>different than if the variables had been declared with
>>	    auto int i;
>>	    int j;
>
>No, the "auto" was implicit in the previous example.  In fact there
>is no real use for an explicit "auto" keyword in C.

Well, I have found one use: bringing code up under buggy C compilers.
Some earlier versions of the Masscomp C compiler choke and die when
handed large programs with lots of "register" variables.  I almost
always got them to come up by specifying

	-Dregister=auto

Some people attempt

	-Dregister=

in such cases, but this often leads to invalid C.

-- 
- Joe Buck
	jbuck at epimass.epi.com, or uunet!epimass.epi.com!jbuck,
	or jbuck%epimass.epi.com at uunet.uu.net for old Arpa sites



More information about the Comp.std.c mailing list