Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!ucsd!ucsdhub!hp-sdd!hplabs!hpda!hp-sde!hpfcdc!hpislx!hplvla!hplvly!boyne
From: boyne@hplvly.HP.COM (Art Boyne)
Newsgroups: comp.lang.c
Subject: Re: Varibale (length) argument lists (Re: C vs. FORTRAN)
Message-ID: <3950010@hplvly.HP.COM>
Date: 12 Jul 88 15:45:58 GMT
References: <1037@ficc.UUCP>
Organization: HP Loveland Inst Div, CO
Lines: 19

> rrr@naucse.UUCP (Bob Rose ) writes:
> In article <5234@ihlpf.ATT.COM>, nevin1@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