Aucbvax.4111 fa.unix-wizards utzoo!decvax!ucbvax!unix-wizards Tue Sep 29 16:36:39 1981 #if bug in 'lint' >From pur-ee!bruner@Berkeley Tue Sep 29 16:34:48 1981 I have also had problems with "#if" statements when running "lint". The problem appears to be a vanilla 7 bug in the C preprocessor. It appears that "cpp" does not properly handle comments within conditionals. For instance, in the following code #define JUNK 1 /* comment */ #if JUNK == 1 --blah-- #endif the "#if JUNK == 1" is expanded to "#if 1 /* comment */ == 1", and the preprocessor apparently doesn't understand the embedded comment. Comments are only saved if the "-C" flag is specified when calling the preprocessor. Since "cc" doesn't specify "-C" and "lint" does (to be able to read its directives from the source), the problem only shows up when "lint" is run. --John Bruner ----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen of http://communication.ucsd.edu/A-News/ This Usenet Oldnews Archive article may be copied and distributed freely, provided: 1. There is no money collected for the text(s) of the articles. 2. The following notice remains appended to each copy: The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.