This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/54962] Strange-looking diagnostics from diagnostic_report_current_module() from warnings emitted during LTO
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 18 Oct 2012 09:55:45 +0000
- Subject: [Bug lto/54962] Strange-looking diagnostics from diagnostic_report_current_module() from warnings emitted during LTO
- Auto-submitted: auto-generated
- References: <bug-54962-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54962
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-10-18
Ever Confirmed|0 |1
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> 2012-10-18 09:55:45 UTC ---
(In reply to comment #0)
> 290 while (! MAIN_FILE_P (map))
> 291 {
> 292 map = INCLUDED_FROM (line_table, map);
>
> This code appears to assume (via MAIN_FILE_P) that there is a concept of a main
> file, and that everything else is included from it. However in the context of
> diagnostics emitted during LTO it's not clear that this concept makes sense (or
> maybe I'm missing something? I also wonder if by attempting to issue
> diagnostics from within lto1 if I'm in unexplored territory here?)
You definitely are, if you are expecting everything to work just fine ;)
> This is called by default_tree_diagnostic_starter FWIW; perhaps lto1 needs its
> own implementation of this?
Maybe yes. LTO should print the "main" file as well (so it doesn't have
a MAIN_FILE_P), but not as included-from but in some other way.
Patches welcome ;)