public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/62161] New: more precise locations for command-line diagnostics Date: Sat, 16 Aug 2014 10:41:00 -0000 [thread overview] Message-ID: <bug-62161-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62161 Bug ID: 62161 Summary: more precise locations for command-line diagnostics Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: manu at gcc dot gnu.org manuel@gcc10:~$ cc1 -D A=2 redef.c redef.c:1:0: warning: "A" redefined #define A 1 ^ <command-line>:0:0: note: this is the location of the previous definition We could print instead: <command-line>:1:4: note: this is the location of the previous definition -D A=2 redef.c ^ clang tries to do something similar but they print some kind of intermediate file: manuel@gcc10:~$ clang -D A=2 redef.c redef.c:1:9: warning: 'A' macro redefined #define A 1 ^ <command line>:1:9: note: previous definition is here #define A 2 ^ One way is to have some location_t bit that tells us when something is the command-line and show_locus can handle this bit to not look a file but use the command-line string as the line. Another way is that the location code that looks up the line handles this transparently (when we create the line-map file for command-line, we push the command-line string somewhere).
reply other threads:[~2014-08-16 10:41 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=bug-62161-4@http.gcc.gnu.org/bugzilla/ \ --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: linkBe 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).