On Fri, Aug 5, 2011 at 10:37 AM, Tom Tromey <tro...@redhat.com> wrote: >>>>>> "Gabriel" == Gabriel Charette <gch...@google.com> writes: > > Gabriel> This hack, has described in more details in the email labeled > Gabriel> "Line 0 Hack??", was now causing problem when serializing the > Gabriel> line_table in pph. > > I think you do have to handle location 0 somehow. > This is UNKNOWN_LOCATION, referred to widely in the sources. >
I do handle location 0, the problem is that this specific call to linemap_line_start was made late, after all linemap entries had exited (LC_LEAVE), and thus this would create a new LC_ENTER in the table and the parsing would finish with line_table->depth == 1 (instead of 0 as expected)... This bug never really showed up because at that point no one is trying to add new entries to the line_table, it only shows up now that we're trying to serialize the line_table. > Gabriel> 2011-08-01 Gabriel Charette <gch...@google.com> > Gabriel> * decl.c (finish_function): Remove unecessary line 0 hack. > > Now that -Wunreachable-code is gone, I doubt this code is even > theoretically relevant. So, while I can't approve or reject this patch, > it seems reasonable to me. > Ok Thanks, Gabriel