(C++) bug in handling '# <n> foo\\bar.h'

Mumit Khan khan@nanotech.wisc.edu
Wed Dec 8 07:27:00 GMT 1999


The C++ front-end cannot handle the following preprocessed file:

  # 1 "c++-cpp-bug.cpp"
  # 1 "foo\\c++-cpp-bug.h" 1
  class 
  cFoo
  {
  public:
    cFoo ()
      {
  # 15 "foo\\c++-cpp-bug.h"



      }
  };
  # 1 "c++-cpp-bug.cpp" 2


In file included from c++-cpp-bug.cpp:1:
foo\c++-cpp-bug.h: In method `cFoo::cFoo ()':
foo\c++-cpp-bug.h:7: unknown escape sequence `\c'

The problem happens with both release and mainline branches. Interestingly,
the problem only happens for the *second* ``# <n> foo\\c++-cpp-bug.h'' and 
goes away if I remove some of the code around it.

Regards,
Mumit



More information about the Gcc-bugs mailing list