New Cpp not right for non-C files

Anthony Thyssen anthony@kobold.cit.gu.edu.au
Wed Jul 26 20:22:00 GMT 2000


For a very long time I have been using the C-preprocessor for 
large scale documention control. EG: I create a document with
various CPP #ifdef #endif controls so I can then use cpp to
generate from the single source a large number of slightly different
files. The point is a single source for all the docimentation

For example see...
  http://www.sct.gu.edu.au/~anthony/info/www/frame.hints
for setting up Web Frames.

Up until my last upgrade 3 weeks ago, cpp with -P -undef and when using
gnu cpp the  -traditional flag has been happy to do this sort of thing

Suddenly (with latest upgrade to gcc 2.95.2 - SuSE linux 6.4 ) 
it is now producing huge numbers of errors such as....

Images.cpp:42: unterminated character constant
Images.cpp:45: unbalanced `#endif'
Images.cpp:76: unterminated string or character constant
Images.cpp:79: unterminated string or character constant
Images.cpp:82: unterminated character constant
Images.cpp:115: unterminated character constant
Images.cpp:123: unterminated string or character constant
Images.cpp:129: unterminated character constant
Images.cpp:133: unterminated character constant
Images.cpp:137: unterminated character constant
Images.cpp:141: unterminated character constant
Images.cpp:312: unterminated character constant
Images.cpp:325: unterminated character constant
Images.cpp:360: unterminated character constant
Images.cpp:370: unterminated character constant
Images.cpp:112: unterminated `#else' conditional

This output was generated using the command...
  cpp -undef -P -traditional -DDEFAULT Images.cpp > Images.html

on the file
   http://www.sct.gu.edu.au/~anthony/icons/www/Images.cpp

the previous version of gnu cpp, nor any other cpp program (solaris,
sunos, sgi, etc) has any such problems.

All I wanted from cpp is basic # controls and macro substition.
It is definatally nolonger ``traditional''!

How can I fix this. I can't even find an options I can use to fix this
situation.  Maybe you need a   -lang non-c   option!

Very disappointed....

  Anthony Thyssen ( System Programmer )    http://www.sct.gu.edu.au/~anthony/
 -----------------------------------------------------------------------------
   ... money is like air and love, - unimportant if you've got
   enough of it, but desperately important if you haven't.
                             -- Terry Pratchett, ``Science of Diskworld''
 -----------------------------------------------------------------------------
     PGP Public Key available -- finger -l anthony@lyrch.cit.gu.edu.au  


More information about the Gcc-bugs mailing list