Hi,
Sending this email again for it apparently hasn't come through last time.
There is an error when compiling Gecode in debug mode with clang and
-std=c++11 (I compile Gecode as a part of another project, so I don't use
the default flags):
gecode/flatzinc/flatzinc.cpp:280:34: error: comparison between pointer and
integer ('SharedHandle::Object *' and 'int')
(__builtin_expect(!(object() == false), 0) ? __assert_rtn(__func__,
"gecode/flatzinc/flatzinc.cpp", 280, "object() == false") : (void)0);
~~~~~~~~ ^ ~~~~~
This can be reproduced by compiling Gecode with the following commands:
CXX=clang++ CXXFLAGS=-std=c++11 ./configure --enable-debug
make
The attached patch fixes the error.
Best regards,
Victor
From a87aec2b437ce8149f9c35c4b27f81a6bc549248 Mon Sep 17 00:00:00 2001
From: Victor Zverovich <[email protected]>
Date: Tue, 8 Apr 2014 11:45:57 -0700
Subject: [PATCH] Fix compile error on clang with -stc=c++11
---
gecode/flatzinc/flatzinc.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gecode/flatzinc/flatzinc.cpp b/gecode/flatzinc/flatzinc.cpp
index 73b7aec..08bcc37 100644
--- a/gecode/flatzinc/flatzinc.cpp
+++ b/gecode/flatzinc/flatzinc.cpp
@@ -277,7 +277,7 @@ namespace Gecode { namespace FlatZinc {
void
BranchInformation::init(void) {
- assert(object() == false);
+ assert(object() == 0);
object(new BranchInformationO());
}
--
1.8.3.2
_______________________________________________
Gecode users mailing list
[email protected]
https://www.gecode.org/mailman/listinfo/gecode-users