[gecode-users] Fwd: error when compiling Gecode with clang and -std=c++11
Christian Schulte
cschulte at kth.se
Tue Apr 29 08:02:11 CEST 2014
Victor, thanks again. Fixed in the trunk! Cheers Christian
--
Christian Schulte, KTH, web.it.kth.se/~cschulte/
From: victor.zverovich at gmail.com [mailto:victor.zverovich at gmail.com]
Sent: Tuesday, April 29, 2014 02:39 AM
To: cschulte at kth.se
Cc: Guido Tack; users at gecode.org
Subject: Re: [gecode-users] Fwd: error when compiling Gecode with clang and -std=c++11
Thanks, Christian!
Here's another trivial patch that fixes access to uninitialized member.
Best regards,
Victor
On Mon, Apr 28, 2014 at 11:55 AM, Christian Schulte <cschulte at kth.se <mailto:cschulte at kth.se> > wrote:
Hi Victor,
Thanks! I just committed the patch to the trunk.
Cheers
Christian
--
Christian Schulte, www.ict.kth.se/~cschulte/ <http://www.ict.kth.se/~cschulte/>
From: users-bounces at gecode.org <mailto:users-bounces at gecode.org> [mailto:users-bounces at gecode.org <mailto:users-bounces at gecode.org> ] On Behalf Of victor.zverovich at gmail.com <mailto:victor.zverovich at gmail.com>
Sent: Monday, April 28, 2014 8:17 PM
To: Guido Tack
Cc: users at gecode.org <mailto:users at gecode.org>
Subject: Re: [gecode-users] Fwd: error when compiling Gecode with clang and -std=c++11
Hi Guido,
Thanks for committing the fix. There is one more, minor issue. I get a few warnings when using Gecode headers with a high warning level:
gecode/set.hh:1278: warning: comma at end of enumerator list
gecode/float.hh:1653: warning: comma at end of enumerator list
Trailing commas in enums were only added in C++11 and, although most C++ compilers support them as an extension, I think it would be nice if headers didn't rely on extensions. The attached patch fixes the warnings.
Cheers,
Victor
On Thu, Apr 24, 2014 at 11:00 PM, Guido Tack <tack at gecode.org <mailto:tack at gecode.org> > wrote:
Thanks Victor!
I've added your fix to the svn trunk.
Cheers,
Guido
--
Guido Tack
http://www.csse.monash.edu/~guidot/
On 25 Apr 2014, at 10:33 am, victor.zverovich at gmail.com <mailto:victor.zverovich at gmail.com> wrote:
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
<fix-clang-c++11-error.patch>_______________________________________________
Gecode users mailing list
users at gecode.org <mailto:users at gecode.org>
https://www.gecode.org/mailman/listinfo/gecode-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20140429/72f8d27c/attachment.html>
More information about the users
mailing list