C compiler (and lint) bug on DS3100
Chris Torek
chris at mimsy.UUCP
Wed Jul 26 09:00:34 AEST 1989
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 at mimsy.umd.edu Path: uunet!mimsy!chris
More information about the Comp.unix.ultrix
mailing list