Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!MITVMA.MIT.EDU!BAIHELP%TAMSTAR.BITNET From: BAIHELP%TAMSTAR.BITNET@MITVMA.MIT.EDU Newsgroups: gnu.gcc.bug Subject: VMS 5.1/GCC 1.35 return value bug Message-ID: <8907200507.AA12935@life.ai.mit.edu> Date: 20 Jul 89 05:06:00 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 24 Well -- Having read the letter from Chris Siebenmann about how Unix normally ignores a return value if one is not supplied, I still has a problem. Isn't it the same thing to want to return a "all ok" signal to the operating system if no other value is supplied (ie. exit(-1);). I assume that Unix does return "some kind" of value if one is not supplied. This is what VMS is expecting. If you don't exit in a particular way (ie. exit(-1);) then VAX C assumes everything went ok, puts a 1 in r0 and returns. Where should the code be modified to cause a return from main to be different from a return from any other routine, in that a assumed return value of 1 is supplied in r0. Bryan A. Ignatow VMS Software Specialist Public Domain Software Specialist Academic Vax Cluster Texas A&M Univeristy Bitnet: BAIHELP@TAMVENUS Internet: BAIHELP@venus.tamu.edu