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


Groups > comp.compilers > #1342

Re: How to type braces for computed gotos

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED!nerds-end
From federation2005@netzero.com
Newsgroups comp.compilers
Subject Re: How to type braces for computed gotos
Date Mon, 21 Jul 2014 10:32:28 -0700 (PDT)
Organization Compilers Central
Lines 37
Sender news@iecc.com
Approved comp.compilers@iecc.com
Message-ID <14-07-052@comp.compilers> (permalink)
References <14-05-013@comp.compilers> <14-07-033@comp.compilers> <14-07-035@comp.compilers>
NNTP-Posting-Host news.iecc.com
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 8bit
X-Trace miucha.iecc.com 1405964646 61429 2001:470:1f07:1126:0:676f:7373:6970 (21 Jul 2014 17:44:06 GMT)
X-Complaints-To abuse@iecc.com
NNTP-Posting-Date Mon, 21 Jul 2014 17:44:06 +0000 (UTC)
Keywords design
Posted-Date 21 Jul 2014 13:44:05 EDT
X-submission-address compilers@iecc.com
X-moderator-address compilers-request@iecc.com
X-FAQ-and-archives http://compilers.iecc.com
Xref csiph.com comp.compilers:1342

Show key headers only | View raw


On Friday, July 18, 2014 9:21:28 PM UTC-5, glen herrmannsfeldt wrote:
> > [That's an extension. In standard C, you can only goto a label. -John
> > Perhaps it's similar to this GCC extension
> >
https://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html#Labels-as-Values]
> In standard C you can only goto label constants.

I read the type from context. The compiler test uses a prefix "&&" operator,
which is the same as the one used in GCC for addressing goto labels.

The particular points of interest and contact are several:

One, it indirectly hooks up with an earlier thread here on multi-level
jumps.  This leads directly to the notion of continuations, with the
archetypical case in point being Scheme ...

Two, ... and a second case in point being the old stand-by DC, which
has never received a solid well-founded standardization because of its
heavy use of continuations (i.e. a good high-level language analogue
of DC's string-based "execute" command).

Three, both these and the computed goto lead directly to the notion of
multi-entry point routines, coroutines and multi-threaded computation.
(Which ties to the thread about "the most important part of a
compiler").

I was hoping for a more robust typing scheme to be in place for
continuations since the question of how to type continuations has
always been a major road block for me, and it looked like this
compiler might have been experimenting with some kind of
continuation-typing, more robust than the one-size-fits-all "solution"
that GCC has.

In GCC itself, it might be worth considering an upgrade to
continuations that inherit their type from the return type of the
function body they reside in (or: if lambdas are allows, like Java or
C++ ... from the return type of the enclosing lambda).

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


Thread

Best "simple" C Compiler I've ever seen andrewchamberss@gmail.com - 2014-05-04 18:23 -0700
  Re: Best "simple" C Compiler I've ever seen federation2005@netzero.com - 2014-06-30 12:42 -0700
  How to type braces for computed gotos (was: Best "simple" C Compiler I've ever seen) federation2005@netzero.com - 2014-07-18 14:44 -0700
    Re: How to type braces for computed gotos glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2014-07-19 02:21 +0000
      Re: How to type braces for computed gotos Ivan Godard <ivan@ootbcomp.com> - 2014-07-18 21:59 -0700
      Re: How to type braces for computed gotos federation2005@netzero.com - 2014-07-21 10:32 -0700
    Re: How to type braces for computed gotos (was: Best "simple" C Compiler I've ever seen) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-07-21 11:45 +0000
      Re: How to type braces for computed gotos glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2014-07-21 16:19 +0000
      Re: How to type braces for computed gotos wclodius@earthlink.net (William Clodius) - 2014-07-21 21:44 -0600
        Re: How to type braces for computed gotos glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2014-07-23 00:35 +0000
          Re: How to type braces for computed gotos wclodius@earthlink.net (William Clodius) - 2014-07-22 22:36 -0600
            Re: How to type braces for computed gotos anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-07-25 22:38 -0400

csiph-web