This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix for mklog


On 11/06/2014 12:07 PM, Yury Gribov wrote:
On 11/06/2014 11:00 AM, Marat Zakirov wrote:
-    if ($doubtfunc) {
-        $idx = $line_idx;
+    $idx = $line_idx;
      # Skip line info in context diffs.
-        while ($is_context_diff && $diff_lines[$idx + 1] =~
/^[-\*]{3} [0-9]/) {
-            ++$idx;
-        }
+    while ($idx <= $#diff_lines && $is_context_diff
+               && $diff_lines[$idx + 1] =~ /^[-\*]{3} [0-9]/) {
+        ++$idx;
+    }

In original mklog this part was only run immediately after start of new
hunk (which is correct) whereas with your patch it can now run in the
middle of hunk.

Ok, I've inspected the context diff format and it seems that I was wrong - line markers (^--- and ^***) can appear inside hunks.

So patch LGTM but you need to wait for maintainer's (i.e. Diego's) approval.

-Y


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]