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 <t...@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.zverov...@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@gecode.org > https://www.gecode.org/mailman/listinfo/gecode-users > > >
From 2c6ffdda887a1527f8c21797ca5e97e511a100e3 Mon Sep 17 00:00:00 2001 From: Victor Zverovich <victor.zverov...@gmail.com> Date: Mon, 28 Apr 2014 10:36:44 -0700 Subject: [PATCH] Fix GCC warning "comma at end of enumerator list". --- gecode/float.hh | 4 ++-- gecode/set.hh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gecode/float.hh b/gecode/float.hh index 03142e9..24b3398 100644 --- a/gecode/float.hh +++ b/gecode/float.hh @@ -1649,8 +1649,8 @@ namespace Gecode { enum Select { SEL_SPLIT_MIN, ///< Select values not greater than mean of smallest and largest value SEL_SPLIT_MAX, ///< Select values greater than mean of smallest and largest value - SEL_SPLIT_RND, ///< Select values randomly which are not greater or not smaller than mean of largest and smallest value - SEL_VAL_COMMIT, ///< Select value according to user-defined functions + SEL_SPLIT_RND, ///< Select values randomly which are not greater or not smaller than mean of largest and smallest value + SEL_VAL_COMMIT ///< Select value according to user-defined functions }; protected: /// Which value to select diff --git a/gecode/set.hh b/gecode/set.hh index 02c799d..97dc60b 100644 --- a/gecode/set.hh +++ b/gecode/set.hh @@ -1275,7 +1275,7 @@ namespace Gecode { SEL_AFC_SIZE_MIN, ///< With smallest accumulated failure count divided by domain size SEL_AFC_SIZE_MAX, ///< With largest accumulated failure count divided by domain size SEL_ACTIVITY_SIZE_MIN, ///< With smallest activity divided by domain size - SEL_ACTIVITY_SIZE_MAX, ///< With largest activity divided by domain size + SEL_ACTIVITY_SIZE_MAX ///< With largest activity divided by domain size }; protected: /// Which variable to select -- 1.8.3.2
_______________________________________________ Gecode users mailing list users@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users