C70:info-cpm (07/17/82)
>From ucivax!csuf!bruce@Ucb-C70 Fri Jul 16 23:33:40 1982
I've found a bug in the preprocessor of BDS C that you're probably already
aware of, but just in case I'll mention it. I have version 1.44 of BDS C (the
accounting people haven't gotten around to getting me the latest version yet).
If you have a string that is terminated by a backslash-newline sequence, and
resumed and terminated on the next line, any macros found after the string in
the next line are not recognized. Example:
printf("This is a string that is continued \
on the next line.\n"); x = CONSTANT; /* CONSTANT will not be expanded. */
This is a fairly easy trap to fall into; when I was writing my C compiler
preprocessor, I had the same problem. It gets really tricky trying to keep
track of comments and strings when you're expanding macros.
Bruce
ucivax!ucbvax!csuf!bruce