Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #1344
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED!nerds-end |
|---|---|
| From | wclodius@earthlink.net (William Clodius) |
| Newsgroups | comp.compilers |
| Subject | Re: How to type braces for computed gotos |
| Date | Mon, 21 Jul 2014 21:44:27 -0600 |
| Organization | Compilers Central |
| Lines | 21 |
| Sender | news@iecc.com |
| Approved | comp.compilers@iecc.com |
| Message-ID | <14-07-054@comp.compilers> (permalink) |
| References | <14-05-013@comp.compilers> <14-07-033@comp.compilers> <14-07-048@comp.compilers> |
| NNTP-Posting-Host | news.iecc.com |
| X-Trace | miucha.iecc.com 1406037947 35623 2001:470:1f07:1126:0:676f:7373:6970 (22 Jul 2014 14:05:47 GMT) |
| X-Complaints-To | abuse@iecc.com |
| NNTP-Posting-Date | Tue, 22 Jul 2014 14:05:47 +0000 (UTC) |
| Keywords | Fortran, history |
| Posted-Date | 22 Jul 2014 10:05:47 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:1344 |
Show key headers only | View raw
Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote: > I guess this compiler implements the labels-as-values extension of GNU > C (aka "computed goto", but see the Fortran note below). The type of > a label is always void *; static typing fans might prefer a separate > label type (or a whole type system for labels), but I guess that the > intersection between static typing fans and the users of this > extension is very small. I have used labels-as-values extensively and > I have not produced errors stemming from confusion between labels and > other occurences of void *. > > BTW, in Fortran this feature is called "assigned goto", and it uses > integer variables (i.e., not a special type, either) for storing the > labels (and therefore needs a separate syntax "assign 50 to l" instead > of just writing "l=50"). Fortran also has a feature called "computed > goto", but that is closer to a C switch than a GNU C "goto *". Not quite the rough equivalent of a C switch statement is the Fortran 90 SELECT CASE. A Fortran computed GO TO, as with an assigned GO TO, does not have a syntactic block associated with it, and can be set up to go to any label within the current program or sub-program.
Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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