This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug preprocessor/41445] Debug information is wrong with and without --save-temps.



------- Comment #1 from jakub at gcc dot gnu dot org  2009-09-23 12:32 -------
Confirmed.  Can be reproduced even with just:
#define A(a,b)
A(1,
  2) int i;
int j;
Here int i; is on the 3rd line, but -E generates
# 1 "h.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "h.c"

 int i;

int j;

The extra line to adjust lines for the two line function-line macro use is
added only after hitting newline after int i;, not already before those tokens.
 So int j; has correct line locus, but int i; doesn't.  Column numbers clearly
can't be maintained the same between normal and -save-temps compilation, that's
a lost case, but perhaps at least line numbers could be kept.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at gcc dot gnu dot
                   |                            |org
  GCC build triplet|i686-linux-gnu              |
 GCC target triplet|arm-none-linux-gnueabi      |


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]