make sure to be compatible with non-gcc/old gcc

This commit is contained in:
Vitor Santos Costa 2009-04-25 10:58:42 -05:00
parent 9ef589aef7
commit 7628c875e8
1 changed files with 4 additions and 2 deletions

View File

@ -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 */