home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / gnu / gcc / bug / 3256 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  1.3 KB

  1. Path: sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!agate!ames!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!usit.uio.NO!h.b.furuseth
  2. From: h.b.furuseth@usit.uio.NO (Hallvard B Furuseth)
  3. Newsgroups: gnu.gcc.bug
  4. Subject: Re: gcc 2.3.3's handling of setjmp like functions
  5. Date: 26 Jan 1993 22:24:26 -0500
  6. Organization: University of Oslo, Norway
  7. Lines: 23
  8. Sender: daemon@cis.ohio-state.edu
  9. Approved: bug-gcc@prep.ai.mit.edu
  10. Distribution: gnu
  11. Message-ID: <H.B.FURUSETH.93Jan26223619@durin.uio.no>
  12. References: h.b.furuseth@usit.uio.NO (Hallvard B Furuseth)
  13.  
  14. In article <9301220819.AA21461@mole.gnu.ai.mit.edu> rms@gnu.ai.mit.edu (Richard Stallman) writes:
  15.  
  16. > It might be reasonable to have a way of doing this, but I don't
  17. > like the idea of using pragma for it.  (Or for anything.)
  18. > Any other ideas?
  19.  
  20. Isn't that what __attribute__ is intended for?
  21. Add __attribute__((setjmp)).
  22.  
  23. Another way:  Register or auto.
  24.     register int setjmp (jmp_buf);
  25.     register volatile void longjmp (jmp_buf, int);
  26.  
  27.  
  28. However, one problem with such extensions is that they fill our header
  29. files with '#if __GNUC__ &&!__STRICT_ANSI__' directives.  So the best
  30. *syntax* may be something like
  31.     int setjmp (jmp_buf) /*ATTRIBUTE:(SETJMP)*/;
  32. which cpp would modify to __attribute__((setjmp)), just as cpp -lint.
  33. --
  34.  
  35. Hallvard
  36.  
  37.