Path: utzoo!news-server.csri.toronto.edu!rutgers!att!cbfsb!cbnewsc!ladd From: ladd@cbnewsc.att.com (david.ladd) Newsgroups: comp.os.minix Subject: Re: A patch to make gcc 1.39 work with Minix setjmp Message-ID: <1991Mar12.225635.29426@cbnewsc.att.com> Date: 12 Mar 91 22:56:35 GMT References: <1991Mar10.223859.380@santra.uucp> Organization: AT&T Bell Laboratories Lines: 22 In article <1991Mar10.223859.380@santra.uucp> jkp@cs.HUT.FI (Jyrki Kuoppala) writes: >As distributed, Minix (1.5.10 and I think also 1.3) setjmp library >routine doesn't save the registers which are not allowed to be >clobbered by the called function. Generally, Unix saves all registers >in setjmp. In my opinion, both of these methods seem to be about as >good, also there are some points to support the Minix style. > >However, the compiler must be aware of when setjmp is called and must >generate code to save the registers which are not allowed to be I quote from the gcc.info file: `-traditional' Attempt to support some aspects of traditional C compilers. Specifically: .... * All automatic variables not declared `register' are preserved by `longjmp'. Ordinarily, GNU C follows ANSI C: automatic variables not declared `volatile' may be clobbered. To me, this suggests you either make everything volatile or use gcc -traditional. What's the big deal?