bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dfa.c:in_coll_range z/OS fixes


From: Paolo Bonzini
Subject: Re: dfa.c:in_coll_range z/OS fixes
Date: Tue, 06 Apr 2010 21:25:43 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.3

On 04/06/2010 09:03 PM, Jim Meyering wrote:
I prefer to avoid even the semblance of dead stores
for the odd-numbered elements.  I've committed the following
change on a private-for-now "old-compilers" branch.
I'll see how much trouble it is to carry this one change
through the upcoming development.  If the branch survives and
grows, I may eventually publish it.

 From 4aeebc7febb4ccd49ecffd0181159c0dd866642c Mon Sep 17 00:00:00 2001
From: Jim Meyering<address@hidden>
Date: Tue, 6 Apr 2010 20:59:10 +0200
Subject: [PATCH] avoid C99 auto initializer syntax

* src/dfa.c (in_coll_range): Initialize explicitly.  For z/OS.
---
  src/dfa.c |    8 +++++++-
  1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/dfa.c b/src/dfa.c
index ca32b66..ef878f2 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -375,7 +375,13 @@ static unsigned char const *buf_end;       /* reference to 
end in dfaexec().  */
  static int
  in_coll_range (char ch, char from, char to)
  {
-  char c[6] = { from, 0, ch, 0, to, 0 };
+  char c[6];
+  c[0] = from;
+  c[1] = 0;
+  c[2] = ch;
+  c[3] = 0;
+  c[4] = to;
+  c[5] = 0;
    return strcoll (&c[0],&c[2])<= 0&&  strcoll (&c[2],&c[4])<= 0;
  }

FWIW, this change seems pretty innocuous.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]