Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Static Arrays Inside Functions Date: Mon, 29 Apr 2019 00:04:37 -0700 Organization: None to speak of Lines: 27 Message-ID: References: <5cc5e100.3546998829@core> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="4c4adbc43591da055523685449c21805"; logging-data="7557"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/DWHlfdOLACv1/oGtKYKy6" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:eLTt5wnZitMyuxCC+/07RRqrRac= sha1:RcSW5f3ZNaecRI0cOIefjv5tFoM= Xref: csiph.com comp.lang.c:143523 Ike Naar writes: > On 2019-04-28, Keith Thompson wrote: >> { >> int r = rand(); >> time_t now = time(NULL); >> } >> >> The initial values of r and now are not stored in the object code. >> They're computed at run time. > > The subject is 'static arrays inside functions'. Yes, I know that's the subject of the thread, but I was responding to this statement: Not to belabor the obvious related issue, but if you have *any* initialized variable, where would you expect those initializing values to be stored if not in the object code? (which you snipped). [...] -- Keith Thompson (The_Other_Keith) kst-u@mib.org Will write code for food. void Void(void) { Void(); } /* The recursive call of the void */