Re: Using C as a back end

Randall Hyde <rhyde@cs.ucr.edu>
1 Nov 2000 18:52:50 -0500

          From comp.compilers

Related articles
[21 earlier articles]
Re: Using C as a back end engler@Stanford.EDU (2000-10-31)
Re: Using C as a back end anton@mips.complang.tuwien.ac.at (2000-10-31)
Re: Using C as a back end joachim_d@gmx.de (Joachim Durchholz) (2000-10-31)
Re: Using C as a back end conway@ender.cs.mu.oz.au (2000-11-01)
Re: Using C as a back end kst@cts.com (Keith Thompson) (2000-11-01)
Re: Using C as a back end rhyde@cs.ucr.edu (Randall Hyde) (2000-11-01)
Re: Using C as a back end rhyde@cs.ucr.edu (Randall Hyde) (2000-11-01)
Re: Using C as a back end vbdis@aol.com (2000-11-04)
Re: Using C as a back end joachim_d@gmx.de (Joachim Durchholz) (2000-11-04)
Re: Using C as a back end thp@roam-thp2.cs.ucr.edu (Tom Payne) (2000-11-04)
Re: Using C as a back end gneuner@dyn.com (2000-11-04)
Re: Using C as a back end fjh@cs.mu.OZ.AU (2000-11-05)
Re: Using C as a back end freitag@alancoxonachip.com (Andi Kleen) (2000-11-05)
[1 later articles]
| List of all articles for this month |

From: Randall Hyde <rhyde@cs.ucr.edu>
Newsgroups: comp.compilers
Date: 1 Nov 2000 18:52:50 -0500
Organization: Posted via Supernews, http://www.supernews.com
References: 00-10-148 00-10-154 00-10-212 00-10-228
Keywords: C
Posted-Date: 01 Nov 2000 18:52:50 EST

Tom Payne at thp@cs.ucr.edu wrote on 10/31/00 12:39 PM:


> For many applications, indirect jumps (computed gotos) are essential.
> gcc allows a program to load a label L into a void* pointer p via the
> expression p=&&L. One can then goto L via the statement goto *p;
> There are, however, ways to fake this sort of thing in Standard C/C++
> by using a switch statement.
>
> Tom Payne
> [Once again, an indirect jump is, in Fortran-ese, an assigned goto.
> Or if you speak Cobol, it's an ALTERed goto. -John]


In Tom's defense, I'd point out that you could create an array of
these pointers and do the equivalent of a FORTRAN assigned GOTO
by indexing into the array. Arguably a bit more flexible than
a switch statement.
Randy Hyde


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.