[Bug preprocessor/15913] New: Preprocessor dies on // comment if --traditional-cpp is specified

pkoning at equallogic dot com gcc-bugzilla@gcc.gnu.org
Thu Jun 10 19:58:00 GMT 2004


gcc -E --traditional-cpp test.c

test.c is:
#ifdef notyet
not yet
#endif // comment

Results in:
# 1 "../cvs162/NetBSD162/src/test.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "../cvs162/NetBSD162/src/test.c"
../cvs162/NetBSD162/src/test.c:0: internal compiler error: Abort trap
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

According to gdb, the abort is in _cpp_process_line_notes.  I dug a bit and it
looks like it's processing the "sentinel" line note, which the comment says
should never be processed.  That's as far as I managed to get.

-- 
           Summary: Preprocessor dies on // comment if --traditional-cpp is
                    specified
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pkoning at equallogic dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-unknown-netbsdelf1.6.2
  GCC host triplet: i386-unknown-netbsdelf1.6.2
GCC target triplet: i386-unknown-netbsdelf1.6.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15913



More information about the Gcc-bugs mailing list