Outright bug in the SGI C compiler...
David B. Anderson
davea at quasar.wpd.sgi.com
Wed Nov 29 03:17:04 AEST 1989
In article <1989Nov27.234730.25669 at vicom.com> steve at 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 at sgi.com ]
More information about the Comp.sys.sgi
mailing list