From 7628c875e8de0ab2e5b879a06176ebf68e50df0c Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Sat, 25 Apr 2009 10:58:42 -0500 Subject: [PATCH] make sure to be compatible with non-gcc/old gcc --- C/exec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/C/exec.c b/C/exec.c index aca068444..253ad922a 100644 --- a/C/exec.c +++ b/C/exec.c @@ -1326,6 +1326,8 @@ p_restore_regs2(void) static Int p_clean_ifcp(void) { Term t = Deref(ARG1); + choiceptr pt0; + if (IsVarTerm(t)) { Yap_Error(INSTANTIATION_ERROR, t, "cut_at/1"); return FALSE; @@ -1335,9 +1337,9 @@ p_clean_ifcp(void) { return FALSE; } #if SBA - choiceptr pt0 = (choiceptr)IntegerOfTerm(t); + pt0 = (choiceptr)IntegerOfTerm(t); #else - choiceptr pt0 = cp_from_integer(t); + pt0 = cp_from_integer(t); #endif if (pt0 < B) { /* this should never happen */