Varibale (length) argument lists (Re: C vs. FORTRAN)

Art Boyne boyne at hplvly.HP.COM
Wed Jul 13 01:45:58 AEST 1988


> rrr at naucse.UUCP (Bob Rose ) writes:
> In article <5234 at ihlpf.ATT.COM>, nevin1 at ihlpf.ATT.COM (00704a-Liber) writes:
>  > Security in FORTRAN (with respect to calling conventions)??  Look at the
>  > 
>  > 	subroutine foo(j)
>  > 	j = 5
>  > 	end
>  > 	...
>  > 	call foo(1)
>  > 
>
> Oh boy! You must be using some sort of new compiler. The old one's (not
> all of course) would after running this code change _all_ integer constants
> of value 1 to value 5. Try debugging the code after that occurs.

Bob is right - I remember spending over a week tracking down just this sort of
behavior when taking a compiler class back in college.  It caused an infinite
loop in a memory clearing routine, wiping out all relevant variable values!

Art Boyne, ...!hplabs!hplvly!boyne



More information about the Comp.lang.c mailing list