Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #7389

Re: what is n1570?

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: what is n1570?
Date 2011-07-01 13:23 -0700
Organization None to speak of
Message-ID <lntyb5698h.fsf@nuthaus.mib.org> (permalink)
References <5903d461-260f-4d81-a120-e0d787c3c0f1@z7g2000prh.googlegroups.com> <1b62nofk75.fsf@snowball.wb.pfeifferfamily.net> <6998523e-c479-4858-b93d-a56dc0bb3356@d7g2000vbv.googlegroups.com> <iul8dc$5i6$1@oravannahka.helsinki.fi>

Show all headers | View raw


Lauri Alanko <la@iki.fi> writes:
> In article <6998523e-c479-4858-b93d-a56dc0bb3356@d7g2000vbv.googlegroups.com>,
> pete  <pete@pwilson.net> wrote:
>> Horrifying to me because I didn't understand that the const qualifier
>> has run-time implications. But now I got my mind right, boss.
>
> Note that these run-time implications are a _good_ thing. Because a
> program isn't allowed to modify const storage, this means that
> multiple running instances of a program (or of several programs using
> the same library) can all share a single instance of this read-only
> data in memory.

Yes, but an implementation isn't *required* to do that.

A conforming implementation could generate exactly the same code
for a given program and for the same program with all occurences of
"const" removed, as long as it issues the required diagnostics for
any constraint violations.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Nokia
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

what is n1570? pete <pete@pwilson.net> - 2011-06-29 08:24 -0700
  Re: what is n1570? Noob <root@127.0.0.1> - 2011-06-29 18:08 +0200
  Re: what is n1570? Shao Miller <sha0.miller@gmail.com> - 2011-06-29 12:29 -0400
  Re: what is n1570? Keith Thompson <kst-u@mib.org> - 2011-06-29 10:26 -0700
  Re: what is n1570? Seebs <usenet-nospam@seebs.net> - 2011-06-29 17:46 +0000
  Re: what is n1570? Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2011-06-29 14:37 -0600
    Re: what is n1570? Seebs <usenet-nospam@seebs.net> - 2011-06-29 21:15 +0000
      Re: what is n1570? Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2011-06-29 20:39 -0600
        Re: what is n1570? Seebs <usenet-nospam@seebs.net> - 2011-06-30 14:52 +0000
    Re: what is n1570? pete <pete@pwilson.net> - 2011-07-01 12:43 -0700
      Re: what is n1570? Lauri Alanko <la@iki.fi> - 2011-07-01 19:50 +0000
        Re: what is n1570? Keith Thompson <kst-u@mib.org> - 2011-07-01 13:23 -0700
  Re: what is n1570? "J. J. Farrell" <jjf@bcs.org.uk> - 2011-06-29 23:32 +0100
  Re: what is n1570? Keith Thompson <kst-u@mib.org> - 2011-06-29 16:55 -0700

csiph-web