home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.arch:8896 comp.lang.misc:2726
- Newsgroups: comp.arch,comp.lang.misc
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!menudo.uh.edu!sugar!ficc!peter
- From: peter@ferranti.com (Peter da Silva)
- Subject: PL/1 non-local goto versus setjmp/longjmp
- Re: CISC Microcode
- Message-ID: <id.VJBS.0DK@ferranti.com>
- Followup-To: comp.lang.misc
- Organization: Xenix Support, FICC
- References: <55930@mentor.cc.purdue.edu> <1992Aug05.203238.141042@cs.cmu.edu> <1992Aug12.073130.1@zodiac.rutgers.edu>
- Date: Thu, 13 Aug 1992 14:50:06 GMT
- Lines: 21
-
- In article <1992Aug12.073130.1@zodiac.rutgers.edu> leichter@zodiac.rutgers.edu writes:
- > So now C has TWO distinct
- > label constructs: foo: for "local" labels, setjmp for potentially non-local
- > ones. And you can "assign" the latter, but not the former. GCC, with its
- > label addresses, could at least have unified the two - but, no.
-
- I will be the last to claim that C is perfect, but I think this is an important
- distinction. It's bad enough having a label and trying to figure out how it got
- there, but if you have to look for gotos in all the subroutines as well...?
-
- Personally, I'd prefer if C had no goto at all, but an organized system of
- contexts, so you could perform setjmp/longjmp operations within a routine.
-
- That, and switch, would cover virtually all use of goto while reasonably
- restricting its scope. It would also force compiler writers to optimise
- switch and longjmp instead of inventing clever hacks of limited utility.
- --
- Peter da Silva `-_-'
- $ EDIT/TECO LOVE 'U`
- %TECO-W-OLDJOKE Not war? Have you hugged your wolf today?
- Ferranti Intl. Ctls. Corp. Sugar Land, TX 77487-5012 +1 713 274 5180
-