mike@yunexus.yorku.ca (Mike Marques) (08/17/89)
Greetings... 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? Mike -- Mike Marques | Usenet: ......!utzoo!yunexus!mike York University (Computing Services) | mike@nexus.yorku.ca -------------------------------------| Bitnet: mike@libra.yorku.ca Only visiting this planet... | Voice: (416) 736-5257
rogerk@mips.COM (Roger B.A. Klorese) (08/19/89)
In article <MIKE.89Aug17113922@yunexus.yorku.ca> 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