Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!csd4.csd.uwm.edu!bionet!ames!vsi1!wyse!mips!rogerk From: rogerk@mips.COM (Roger B.A. Klorese) Newsgroups: comp.sys.mips Subject: Re: Problems with C RISCompiler Message-ID: <25727@abbott.mips.COM> Date: 18 Aug 89 22:34:50 GMT References:Reply-To: rogerk@mips.COM (Roger B.A. Klorese) Distribution: comp Organization: MIPS Computer Systems, Sunnyvale, CA Lines: 46 In article mike@yunexus.yorku.ca (Mike Marques) writes: >The following C program compiles with the following error messages: > >extern int fred(); > >test(arg1, arg2) >void *arg1, *arg2; >{ > fred(arg1, arg2); >} > >ccom: Error: /tmp/test.c, line 6: arg1 undefined > fred(arg1, arg2); > -------------^ >ccom: Error: /tmp/test.c, line 6: arg2 undefined > fred(arg1, arg2); > -------------------^ >(ccom): /tmp/test.c, line 6: cannot recover from earlier errors: goodbye! > } ^ > > >RICSCompiler C 2.0, RISC/os 4.0. >This program compiles with no problems on a Sun using the standard C compiler >and using the GNU C compiler. The MIPS RISCompiler porting guide does not >mention any problems with void. What gives? First, the short-form answer: "fixed in release 2.10." (See other recently-reported C void* bugs.) Second, the explanation. The current Mips C is a PCC1-based compiler which predates reasonable definitions of the "void" type. We botched some stuff when we tacked on a go at "void" to this base, partly because it wasn't yet well enough defined when we did it, partly just, well, just because. Many of these are fixed in the forthcoming 2.10 release. (Until then, you must use "char*" as in other PCC1-based compilers.) Third, the long-term solution. We are currently developing, for release in 1990, an ANSI C compiler. Fourth, a request. If you expect a bug to be filed by Mips, *please* email a copy of your problem code to hotline@mips.com. -- ROGER B.A. KLORESE MIPS Computer Systems, Inc. phone: +1 408 720-2939 928 E. Arques Ave. Sunnyvale, CA 94086 rogerk@mips.COM {ames,decwrl,pyramid}!mips!rogerk "I want to live where it's always Saturday." -- Guadalcanal Diary