[Bug middle-end/56231] warning traces have bogus line information when using LTO
rguenther at suse dot de
gcc-bugzilla@gcc.gnu.org
Fri Feb 8 09:07:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56231
--- Comment #6 from rguenther at suse dot de <rguenther at suse dot de> 2013-02-08 09:07:09 UTC ---
On Thu, 7 Feb 2013, manu at gcc dot gnu.org wrote:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56231
>
> Manuel L?pez-Ib??ez <manu at gcc dot gnu.org> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> CC| |manu at gcc dot gnu.org
>
> --- Comment #5 from Manuel L?pez-Ib??ez <manu at gcc dot gnu.org> 2013-02-07 19:10:17 UTC ---
> /* Reason for creating a new line map with linemap_add. LC_ENTER is
> when including a new file, e.g. a #include directive in C.
> LC_LEAVE is when reaching a file's end. LC_RENAME is when a file
> name or line number changes for neither of the above reasons
> (e.g. a #line directive in C); LC_RENAME_VERBATIM is like LC_RENAME
> but a filename of "" is not specially interpreted as standard
> input. LC_ENTER_MACRO is when a macro expansion is about to start. */
>
> So perhaps the secret is to use just LC_ENTER?
Hmm, I guessed that eventually the "included from" stuff is
built by nesting LC_ENTER w/o LC_LEAVE, so that probably makes it worse.
At least I see we do an initial
linemap_add (line_table, LC_ENTER, 0, NULL, 0);
which might explain the single "included from" with bogus info.
But ISTR other frontends do sth similar. Though now I'm curious
what breaks if we remove the above from lto/lto-lang.c
More information about the Gcc-bugs
mailing list