GNOME Bugzilla – Bug 138652
Line numbers for defines with /* */ comments are wrong
Last modified: 2004-12-22 21:47:04 UTC
The following lines will produce wrong line numbers for DEFINE_3 to DEFINE_5 and thus wrong links to the source-File #define DEFINE_1 1 // Line number correct #define DEFINE_2 2 /* Line number correct */ #define DEFINE_3 3 /* Line number wrong */ #define DEFINE_4 4 /* Line number wrong */ #define DEFINE_5 5 /* Line number wrong */ This Bug is new in version 1.3.6! Version 1.3.5 resulted in correct line numbers I believe the Problem is in pre.l line 1859/60. The preprocessor inserts a newline after /*...*/ comments: One is included in the comment and thereafter a newline is added by the function outputChar('\n'). If you change the two lines mentioned, that is do not include the newline in the comment, everything works fine.
Created attachment 26169 [details] [review] Proposed bug fix Patched solved problem - tested on Windows only I saw no side effects I compiled using MS VC++6.0 to test it.