[RFC] Extension of SIMPLE for Fortran 95

Steven Bosscher s.bosscher@student.tudelft.nl
Mon Jun 10 10:16:00 GMT 2002


Op ma 10-06-2002, om 18:20 schreef Diego Novillo:
> On Mon, 2002-06-10 at 12:03, Tom Tromey wrote:
---- 8< ----
> > Or to put it another way, why not handle all continue/break using GOTO?
> >
> I can only give you one pretty weak reason: the original SIMPLE grammar
> allows them.  I wouldn't mind handling them using GOTO statements.
> 
> 
> Diego.

The reason why the SIMPLE grammar has break and continue is mentioned in
many papers about the McCat compiler. To pick one of them, from "A
Goto-Elimination Method And Its Implementation For The McCat Compiler"
(Erosa, 1995, 2 citations):

"Another important point is that we have chosen to directly support
break and continue statements. Even though these statements represent a
form of control flow similar to gotos, they can be easily handled by our
structured data flow analysis 6 methods [Sri92, Ema93] Break and
continue statements do not change the controlflow of the programs
outside the scope of the closest enclosing loop structure. In this sense
the program remains compositional, the meaning of the program structure
is given by the meaning of its components."

I have to admit, though, that this may not be very relevant for GCC...

Greetz
Steven




More information about the Gcc mailing list