This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/79300] Wrong diagnostics position
- From: "dmalcolm at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 06 Jul 2017 15:27:09 +0000
- Subject: [Bug c++/79300] Wrong diagnostics position
- Auto-submitted: auto-generated
- References: <bug-79300-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79300
--- Comment #7 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #4)
Thanks; that seems to a slightly different issue, but we may as well keep this
bug open for tracking it.
Am investigating.
It appears to be here, within maybe_unwind_expanded_macro_loc:
212 source_location resolved_exp_loc =
213 linemap_resolve_location (line_table,
214 MACRO_MAP_EXPANSION_POINT_LOCATION
(iter->map),
215 LRK_MACRO_DEFINITION_LOCATION,
NULL);
where:
MACRO_MAP_EXPANSION_POINT_LOCATION (iter->map) is 0x80000001:
(gdb) call inform (0x80000001, "")
tc.cpp:2:1: note:
MOZALLOC_THROW_BAD_ALLOC_IF_HAS_EXCEPTIONS
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
but resolved_exp_loc is 164736:
(gdb) call inform (164736, "")
tc.cpp:2:1: note:
MOZALLOC_THROW_BAD_ALLOC_IF_HAS_EXCEPTIONS
^
so the call to linemap_resolve_location seems to be stripping off the range
information.