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


Groups > comp.lang.c > #18876

Re: addresses of variables

From James Kuyper <jameskuyper@verizon.net>
Newsgroups comp.lang.c
Subject Re: addresses of variables
Date 2012-03-19 16:15 -0400
Organization A noiseless patient Spider
Message-ID <4F6793D1.8020101@verizon.net> (permalink)
References (3 earlier) <44vcm0ve21.fsf@be-well.ilk.org> <jk7ru4$om5$1@dont-email.me> <4F677B52.4020500@verizon.net> <jk80cb$ch7$1@speranza.aioe.org> <32343424.564.1332184637390.JavaMail.geo-discussion-forums@vbla14>

Show all headers | View raw


On 03/19/2012 03:17 PM, hoganlong@gmail.com wrote:
> 
>> It is extremely dangerous when compilers start doing whatever
>> they want instead of LIMITING themselves to COMPILE the code!
>>
>> jacob
> 
> Ah, clearly the words of someone who has never written a compiler.

He has written a compiler, and I gather he's done a fairly good job of
it. He knows immensely more about implementing a compiler than I do; but
I know little bit more about what the standard permits than he does.
Whether or not he's aware of the fact, he himself has made extensive use
of the "doing whatever they want" option, when it applies (and sometimes
when it does not) to implement a number of extensions to C - some fully
conforming, others not so much.

The standard permits things no reasonable implementation would ever do,
and things a good implementation should never do. I'm not sure that this
falls in either of those categories, though. Subject to the constraints
I mentioned in my previous message, I'm not sure it matters much for any
practical purpose what address is printed out. "Practical purposes"
necessarily involve violating one of the restrictions I mentioned.

For instance, if you print the address out to a file, and then read it
back in, that's a different matter; the address you read back in must,
if the object's lifetime has not yet ended, be dereferenceable and, when
dereferenced, actually refer to the same object. The same applies with
addresses that are displayed to the user, and then typed back in by the
user. The fact that this is true interferes with what would otherwise be
natural ways of implementing garbage collection for a conforming
implementation of C.

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


Thread

addresses of variables Zero <chefmuetze@web.de> - 2012-03-18 03:56 -0700
  Re: addresses of variables "BartC" <bc@freeuk.com> - 2012-03-18 11:18 +0000
  Re: addresses of variables jt@toerring.de (Jens Thoms Toerring) - 2012-03-18 11:18 +0000
  Re: addresses of variables pete <pfiland@mindspring.com> - 2012-03-18 07:30 -0500
    Re: addresses of variables Zero <chefmuetze@web.de> - 2012-03-18 04:42 -0700
      Re: addresses of variables Lowell Gilbert <lgusenet@be-well.ilk.org> - 2012-03-19 10:52 -0400
        Re: addresses of variables Stephen Sprunk <stephen@sprunk.org> - 2012-03-19 12:55 -0500
          Re: addresses of variables James Kuyper <jameskuyper@verizon.net> - 2012-03-19 14:30 -0400
            Re: addresses of variables jacob navia <jacob@spamsink.net> - 2012-03-19 20:11 +0100
              Re: addresses of variables hoganlong@gmail.com - 2012-03-19 12:17 -0700
                Re: addresses of variables James Kuyper <jameskuyper@verizon.net> - 2012-03-19 16:15 -0400
                Re: addresses of variables hoganlong@gmail.com - 2012-03-19 14:18 -0700
                Re: addresses of variables "io_x" <a@b.c.invalid> - 2012-03-19 23:26 +0100
            Re: addresses of variables Stephen Sprunk <stephen@sprunk.org> - 2012-03-20 03:52 -0500
              Re: addresses of variables James Kuyper <jameskuyper@verizon.net> - 2012-03-20 06:00 -0400
                Re: addresses of variables Stephen Sprunk <stephen@sprunk.org> - 2012-03-20 16:47 -0500
                Re: addresses of variables James Kuyper <jameskuyper@verizon.net> - 2012-03-20 18:37 -0400
                Re: addresses of variables Stephen Sprunk <stephen@sprunk.org> - 2012-03-21 17:58 -0500
                Re: addresses of variables James Kuyper <jameskuyper@verizon.net> - 2012-03-21 20:24 -0400
                Re: addresses of variables Stephen Sprunk <stephen@sprunk.org> - 2012-03-21 23:53 -0500
                Re: addresses of variables James Kuyper <jameskuyper@verizon.net> - 2012-03-22 06:22 -0400
                Re: addresses of variables Kenneth Brody <kenbrody@spamcop.net> - 2012-03-22 12:01 -0400
                Re: addresses of variables Stephen Sprunk <stephen@sprunk.org> - 2012-03-24 16:09 -0500
                Re: addresses of variables Jens Gustedt <jens.gustedt@loria.fr> - 2012-03-23 13:41 +0100
                Re: addresses of variables James Kuyper <jameskuyper@verizon.net> - 2012-03-23 09:06 -0400
                Re: addresses of variables Jens Gustedt <jens.gustedt@loria.fr> - 2012-03-23 19:47 +0100
                Re: addresses of variables James Kuyper <jameskuyper@verizon.net> - 2012-03-23 16:04 -0400
                Re: addresses of variables Jens Gustedt <jens.gustedt@loria.fr> - 2012-03-24 00:19 +0100
                Re: addresses of variables James Kuyper <jameskuyper@verizon.net> - 2012-03-23 22:20 -0400
                Re: addresses of variables Jens Gustedt <jens.gustedt@loria.fr> - 2012-03-24 09:39 +0100
            Re: addresses of variables Anders Wegge Keller <wegge@wegge.dk> - 2012-03-20 20:02 +0100
              Re: addresses of variables James Kuyper <jameskuyper@verizon.net> - 2012-03-20 15:18 -0400
                Re: addresses of variables Anders Wegge Keller <wegge@wegge.dk> - 2012-03-21 21:37 +0100
          Re: addresses of variables Lowell Gilbert <lgusenet@be-well.ilk.org> - 2012-03-20 11:52 -0400
            Re: addresses of variables Kenneth Brody <kenbrody@spamcop.net> - 2012-03-21 11:04 -0400

csiph-web