cpp using cpplib fails to preprocess asm code

Zack Weinberg zack@bitmover.com
Mon Nov 1 10:16:00 GMT 1999


Philipp Thomas wrote:
> * Zack Weinberg (zack@bitmover.com) [19991031 07:18]:
> 
> > It was a deliberate change and I have very little interest in
> > reverting it.  cpp is the *C* preprocessor.  It has been abused to
> > preprocess other stuff, but that other stuff needs to play by the
> > rules of C syntax, and that includes properly balanced single-quote
> > strings.
> 
> Yep, I agree with you on that point.

I thought about it some more and perhaps I am being too restrictive.
There is a great deal of source out there that wants to go through cpp
despite not being legal C.  In particular I completely forgot about
Fortran.

So my counterproposal is: cpp will cut off strings at end of line with
only a warning, if asked to preprocess something that is demonstrably
not C: assembler, fortran, etc.  This will be determined by the -lang
option.  (The specs are going to need tweaking for this to work
properly, but that's OK.)

zw


More information about the Gcc-bugs mailing list