chris@mimsy.UUCP (Chris Torek) (07/26/89)
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