Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(262)

Issue 4835047: Remove line 0 hack in cp/decl.c (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 11 months ago by Gabriel Charette
Modified:
12 years, 10 months ago
Reviewers:
tromey, steven, Diego Novillo, Lawrence Crowl
CC:
gcc-patches_gcc.gnu.org
Visibility:
Public.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -11 lines) Patch
M gcc/cp/decl.c View 1 chunk +2 lines, -11 lines 0 comments Download

Messages

Total messages: 4
Gabriel Charette
This hack, has described in more details in the email labeled "Line 0 Hack??", was ...
12 years, 11 months ago (2011-08-02 03:15:43 UTC) #1
tromey_redhat.com
>>>>> "Gabriel" == Gabriel Charette <gchare@google.com> writes: Gabriel> This hack, has described in more details ...
12 years, 11 months ago (2011-08-05 17:37:12 UTC) #2
Diego Novillo
On Fri, Aug 5, 2011 at 13:37, Tom Tromey <tromey@redhat.com> wrote: >>>>>> "Gabriel" == Gabriel ...
12 years, 11 months ago (2011-08-05 17:39:26 UTC) #3
Gabriel Charette
12 years, 11 months ago (2011-08-05 18:18:13 UTC) #4
On Fri, Aug 5, 2011 at 10:37 AM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Gabriel" == Gabriel Charette <gchare@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  <gchare@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
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b