Path: utzoo!utgpu!watmath!clyde!att!cbnews!lvc From: lvc@cbnews.ATT.COM (Lawrence V. Cipriani) Newsgroups: comp.lang.c Subject: Two more common C compiler bugs Keywords: compiler,bugs Message-ID: <2432@cbnews.ATT.COM> Date: 2 Dec 88 16:38:53 GMT Organization: AT&T Bell Laboratories, Columbus Lines: 30 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@cbnews.ATT.COM