[gecode-users] Fwd: error when compiling Gecode with clang and -std=c++11

victor.zverovich at gmail.com victor.zverovich at gmail.com
Fri Apr 25 02:33:38 CEST 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20140424/e9d96529/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-clang-c++11-error.patch
Type: text/x-patch
Size: 706 bytes
Desc: not available
URL: <http://www.gecode.org/pipermail/users/attachments/20140424/e9d96529/attachment.bin>


More information about the users mailing list