public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug preprocessor/41445] Debug information is wrong with and without --save-temps.
Date: Wed, 23 Sep 2009 12:32:00 -0000	[thread overview]
Message-ID: <20090923123220.20689.qmail@sourceware.org> (raw)
In-Reply-To: <bug-41445-17506@http.gcc.gnu.org/bugzilla/>



------- 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


  reply	other threads:[~2009-09-23 12:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-23  9:12 [Bug preprocessor/41445] New: " ramana at gcc dot gnu dot org
2009-09-23 12:32 ` jakub at gcc dot gnu dot org [this message]
2009-10-06 13:17 ` [Bug preprocessor/41445] " jakub at gcc dot gnu dot org
2009-10-07  7:38 ` jakub at gcc dot gnu dot org
2009-10-07  8:20 ` jakub at gcc dot gnu dot org
2009-10-09 19:56 ` jakub at gcc dot gnu dot org
2010-01-04 11:09 ` ramana at gcc dot gnu dot org
     [not found] <bug-41445-4@http.gcc.gnu.org/bugzilla/>
2011-03-31  9:53 ` jakub at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090923123220.20689.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).