From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3498dd887729ed19 X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Garbage Collection in Ada Date: 1996/10/20 Message-ID: #1/1 X-Deja-AN: 190864840 references: <01bbb910$f1e73f60$829d6482@joy.ericsson.se> organization: New York University newsgroups: comp.lang.ada Date: 1996-10-20T00:00:00+00:00 List-Id: Bob Duff said Not *quite* true -- there *are* C compilers that try to detect non-ANSI-compliant use of pointers (for debugging purposes only, since it's extremely inefficient), and you presumably would not be able to run GIGI on such a compiler. Of course GIGI is a special case -- when one is committed to doing a bootstrapped compiler, one has a lot of freedom to play games. For example, I'm sure the GNAT front end would not compile on any Ada compiler other than GNAT. In fact, in some cases, one version of the GNAT compiler won't compile under a different (earlier or later) version of GNAT. Well (a) such compilers are not used for serious development in my experience, and in any case (b) we always use GNU C to compile Gigi in any case so it certainly does not affect us. They could have required that type casts of that nature don't lose information, so they're reversible. If they had wanted to, which they didn't. Interesting, certainly K&R requires lossless reversible conversion of pointers to integers and back again. But that's not the point, suppose all pointers were stored by xoring the location of the pointer with the pointer, Silly of course, but legal, providing the code generator properly renormalizes on every load, but enough to bamboozle the CGC. This is an extreme example, you can imagine cases that might actually arise, e.g. encoding some information into pointers in a retrievable way.