Path: utzoo!utgpu!watmath!clyde!att!rutgers!tut.cis.ohio-state.edu!bloom-beacon!apple!kchen From: kchen@Apple.COM (Kok Chen) Newsgroups: comp.lang.c Subject: Re: how widespread is this cpp bug? Keywords: cpp whitespace bug Message-ID: <21499@apple.Apple.COM> Date: 1 Dec 88 17:44:57 GMT References: <49179@pyramid.pyramid.com> <6625@csli.STANFORD.EDU> Organization: Apple Computer Inc, Cupertino, CA Lines: 31 In <6625@csli.STANFORD.EDU> wagner@arisia.xerox.com (Juergen Wagner) writes: >Sun4 (SunOS 4.0): bug! >HP 9000/320 (HP-UX 6.0): bug! >VAX 8700 (Ultrix): bug! > >So I tried one of our old TOPS-20 machines, which happily reported > Error at main+4, line 6 of x.c: > prin/*comment*/tf( > Undefined symbol: "prin" >... It should be pointed out that there are at least two C compilers in common use on TOPS-20. One is the Utah port of pcc that probably propagated this "bug." The other one started out as a "home grown" at Stanford (nowadays called "kcc") and was not based on pcc but simply on what was gleamed off of K&R 1st Ed. This latter was probably the one reported above (the format of the error messages looked familiar...). The Stanford one did not even have a separate preprocessor (cpp) phase. A single symbol table manager handled everything - macros, reserved words, identifiers, types, etc. That is probably what caused it to reject the "prin/**/tf" construct (i.e., the lexical analyser stopped scanning "prin/**/tf" when it saw the first slash, returning the lexeme "prin"). I know for a fact :-) that nothing special was done to purposely reject the "prin/**/tf" hack. (The original version did, however, *purposely disallowed* goto's! :-) :-) Kok Chen {decwrl,sun}!apple!kchen Apple Computer, Inc.