home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / arch / 8896 < prev    next >
Encoding:
Internet Message Format  |  1992-08-13  |  1.7 KB

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