From d1dd093cf3e4f99821674859c38a7b4fa0714ca6 Mon Sep 17 00:00:00 2001 From: Ulya Trofimovich Date: Mon, 10 Aug 2015 10:07:23 +0100 Subject: [PATCH] 'DFA::kCount' type should be ptrdiff_t as it's involved in pointer arithmetics. --- re2c/src/ir/dfa/dfa.cc | 2 +- re2c/src/ir/dfa/dfa.h | 2 +- re2c/src/ir/dfa/state.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/re2c/src/ir/dfa/dfa.cc b/re2c/src/ir/dfa/dfa.cc index 2721ea67..fcee18cb 100644 --- a/re2c/src/ir/dfa/dfa.cc +++ b/re2c/src/ir/dfa/dfa.cc @@ -150,7 +150,7 @@ void DFA::addState(State **a, State *s) tail = &s->next; } -State *DFA::findState(Ins **kernel, uint32_t kCount) +State *DFA::findState(Ins **kernel, ptrdiff_t kCount) { Ins **cP, **iP, *i; State *s; diff --git a/re2c/src/ir/dfa/dfa.h b/re2c/src/ir/dfa/dfa.h index 2cbd3703..fc27ab68 100644 --- a/re2c/src/ir/dfa/dfa.h +++ b/re2c/src/ir/dfa/dfa.h @@ -29,7 +29,7 @@ public: DFA (Ins *, uint32_t, uint32_t, uint32_t, const Char *); ~DFA (); void addState (State **, State *); - State * findState (Ins **, uint32_t); + State * findState (Ins **, ptrdiff_t); void split (State *); void findSCCs (); diff --git a/re2c/src/ir/dfa/state.h b/re2c/src/ir/dfa/state.h index 41af7dfd..6171223e 100644 --- a/re2c/src/ir/dfa/state.h +++ b/re2c/src/ir/dfa/state.h @@ -17,7 +17,7 @@ public: State * next; State * link; uint32_t depth; // for finding SCCs - uint32_t kCount; + ptrdiff_t kCount; Ins ** kernel; bool isPreCtxt; -- 2.40.0