From d5236e86f5597658ebc9de4f205a04c9832fb057 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Wed, 18 Jul 2007 16:37:36 +0000 Subject: [PATCH] Correct the bug introduced by gcc 4.x compliance. Basically : you cannot uses ABL_ARITY_L() macro with the '--' (postfixed decrement) because a pointer is unsigned and crossing zero seems to produce strange results in our case. --- alliance/src/boog/src/bog_map_adapt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alliance/src/boog/src/bog_map_adapt.c b/alliance/src/boog/src/bog_map_adapt.c index b8ad4baf..ebcc0003 100644 --- a/alliance/src/boog/src/bog_map_adapt.c +++ b/alliance/src/boog/src/bog_map_adapt.c @@ -161,7 +161,7 @@ static chain_list* loc_adapt_abl(chain_list* expr, float C) int arity=ABL_ARITY(expr); /*memorize arity*/ /*search the biggest arity which matches expr*/ for (ABL_ARITY_L(expr)=ABL_ARITY(expr)-1 ; ABL_ARITY(expr)>0; - ABL_ARITY_L(expr)--) { + ABL_ARITY_L(expr)=ABL_ARITY(expr)-1) { cell=cell_prepare(expr); if (cell) break; } @@ -242,7 +242,7 @@ extern chain_list* adapt_abl(chain_list* expr) arity=ABL_ARITY(expr); /*memorize arity*/ /*search the biggest arity which matches expr*/ for (ABL_ARITY_L(expr)=ABL_ARITY(expr)-1 ; ABL_ARITY(expr)>0; - ABL_ARITY_L(expr)--) { + ABL_ARITY_L(expr)=ABL_ARITY(expr)-1) { cell=cell_prepare(expr); if (cell) break; }