Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: double strtod( const char *nPtr, char **endPrt); Date: Thu, 12 Nov 2015 18:20:10 -0800 Organization: None to speak of Lines: 30 Message-ID: References: <6b8eee47-6184-45f2-8b56-b0e51c16a763@googlegroups.com> <8bbcc376-a820-4308-b8f2-90bcf4fa13e2@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="15847"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/AfwKG0+gP00wlTBwD8hCr" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:bsocJpaZlNPj7oPwA+BE7yD3ANo= sha1:RBcjSDr35ejJhrrO7zi+IVmhwY4= Xref: csiph.com comp.lang.c:75914 supercat@casperkitty.com writes: > On Thursday, November 12, 2015 at 7:15:01 PM UTC-6, Keith Thompson wrote: >> But that's not what I said. The array object has static storage >> duration, so it's allocated during program startup (before main is >> entered) and remains allocated until the program terminates. That's >> still run time. > > For systems which use non-relocatable code images, allocation occurs > at link time. In many embedded systems, strings will be stored in > some kind of ROM before a program starts (in my younger days, I'd use > a device to store code and data into ROM chips before installing those > chips in the target system). What exactly is supposed to happen at > runtime to create an object from a string which was stored in ROM > before the CPU was powered on and will be accessed directly from > there? What happens at run time is that the relevant chunk of ROM logically changes from being just a chunk of ROM to being a C object accessible to a running C program. In the absence of a running C program, it's not an "object" in the sense used by the C standard. An "object" is a "region of data storage in the execution environment, the contents of which can represent values"; until the program starts, there is no execution environment. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"