Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!mailrus!ames!sgi!davea@quasar.wpd.sgi.com From: davea@quasar.wpd.sgi.com (David B. Anderson) Newsgroups: comp.sys.sgi Subject: Re: Outright bug in the SGI C compiler... Keywords: bug, C, support Message-ID: <45310@sgi.sgi.com> Date: 28 Nov 89 16:17:04 GMT References: <1989Nov27.234730.25669@vicom.com> Sender: davea@quasar.wpd.sgi.com Reply-To: davea@quasar.UUCP (David B. Anderson) Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 33 In article <1989Nov27.234730.25669@vicom.com> steve@vicom.COM (Steve Maurer) writes: > > > While trying to polish off the ends of a project, I ended >up having to do a work-around for a mutual design deficiency between ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >our product and the SGI compiler. However, on the work around ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Please send e-mail on the original compiler problem. I'd like to know what it was so I can fix it. >itself, I found another, much less forgivable bug in the SGI >compiler; an outright violation of the C standard. > > While the compiler allows pointers to functions to be >assigned, it does not allow them to be compared. It also doesn't >allow them to be cast to allow comparison. The following example >illustrates the problem. It was checked out on a number of other >C compilers (Sun being the main one), and it compiled and performs >flawlessly. But not on the SGI. Steve: The problem is that void was not handled properly in released versions of the c compiler. Change the function return types to int and the problem disappears. In the next release (after 3.2) of IRIX void and void * are properly handled. My aplogies for the inconvenience. Regards, [ David B. Anderson Silicon Graphics (415)335-1548 davea@sgi.com ]