Two more common C compiler bugs
Lawrence V. Cipriani
lvc at cbnews.ATT.COM
Sat Dec 3 02:38:53 AEST 1988
One of the most widely distributed C programs I wrote failed to
compile on a UTS(r) C compiler because it was missing a ; inside
a struct definition. For example:
struct a
{
int b, c, d /* ; */
};
Another one I found a while ago is this:
void exit();
void error(v, eval)
void (*v)();
int eval;
{
...
if (v == exit) /* miscompiled line */
exit(eval);
else
return;
}
The compiler thought the comparison of v to exit was invalid.
--
Larry Cipriani, AT&T Network Systems, Columbus OH,
Path: att!cbnews!lvc Domain: lvc at cbnews.ATT.COM
More information about the Comp.lang.c
mailing list