Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!uxc.cso.uiuc.edu!tank!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.unix.ultrix Subject: C compiler (and lint) bug on DS3100 Message-ID: <18740@mimsy.UUCP> Date: 25 Jul 89 23:00:34 GMT Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 24 The DS3100 C compiler (derived from the MIPS compilers) does not believe in expressions of the form integral_expr ? void_expr : void_expr such as this [useless] example: main() { 1 ? (void) 1 : (void) 0; return 0; } This is particularly a problem in void-valued macros built out of other void-valued macros, e.g., #define putone(x) ((void) writeit(x, EXIT_ON_ERROR)) #define putalternative(a, b) (thisway ? putone(a) : putone(b)) For now, the solutions available are #define void int (or equivalent) or rewriting the code to use if/then/else or to avoid void-valued expressions in ?: statements. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris