I'm not sure where to send this, or if anyone is interested, but
attached is a patch that fixes the problem. It will be fixed upstream
for the next release of Gecode.

For further consideration, I'm not positive that this is an actual
problem with gecode-3.0.2. The naming-conflict only occurs in the
header at the function declarations, in the implementation file at the
definitions the function parameters are named share instead of shr
avoiding a naming problem. I'm not a C++ expert though, so I don't
know what the correct behavior is.

Kind regards,
Mikael Zayenz Lagerkvist

On Sat, May 2, 2009 at 6:05 PM, Martin Michlmayr <t...@cyrius.com> wrote:
> Package: gecode
> Version: 3.0.2-1
> User: debian-...@lists.debian.org
> Usertags: ftbfs-gcc-4.4
>
> Your package fails to build with GCC 4.4.  You can reproduce this problem
> with gcc-4.4/g++-4.4 from unstable.
>
>> Automatic build of gecode_3.0.2-1 on em64t by sbuild/amd64 0.53
> ...
>> x86_64-linux-gnu-g++ -I. -g -O2 -DNDEBUG -fPIC -Wextra -Wall -pipe -ggdb 
>> -fvisibility=hidden -O3 -fno-strict-aliasing -ffast-math   \
>>       -c -o gecode/int/count.o  gecode/int/count.cpp
>> In file included from gecode/int/count.cpp:38:
>> ./gecode/int/count.hh:259: error: declaration of 'bool shr'
>> ./gecode/int/count.hh:247: error:  shadows template parm 'bool shr'
>> ./gecode/int/count.hh:299: error: declaration of 'bool shr'
>> ./gecode/int/count.hh:287: error:  shadows template parm 'bool shr'
>> ./gecode/int/count.hh:304: error: declaration of 'bool shr'
>> ./gecode/int/count.hh:287: error:  shadows template parm 'bool shr'
>> ./gecode/int/count.hh:332: error: declaration of 'bool shr'
>> ./gecode/int/count.hh:320: error:  shadows template parm 'bool shr'
>> ./gecode/int/count.hh:337: error: declaration of 'bool shr'
>> ./gecode/int/count.hh:320: error:  shadows template parm 'bool shr'
>> ./gecode/int/count.hh:365: error: declaration of 'bool shr'
>> ./gecode/int/count.hh:353: error:  shadows template parm 'bool shr'
>> ./gecode/int/count.hh:370: error: declaration of 'bool shr'
>> ./gecode/int/count.hh:353: error:  shadows template parm 'bool shr'
>> ./gecode/int/count.hh:398: error: declaration of 'bool shr'
>> ./gecode/int/count.hh:386: error:  shadows template parm 'bool shr'
>> make[2]: *** [gecode/int/count.o] Error 1
>> make[2]: Leaving directory `/build/tbm/gecode-3.0.2'
>
> --
> Martin Michlmayr
> http://www.cyrius.com/
>
>
>
>



-- 
Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/
Index: gecode/int/count.hh
===================================================================
--- gecode/int/count.hh	(revision 8966)
+++ gecode/int/count.hh	(working copy)
@@ -256,7 +256,7 @@
     /// Number of views which are equal and have been eliminated
     int   c;
     /// Constructor for cloning \a p
-    BaseView(Space& home, bool shr, BaseView& p);
+    BaseView(Space& home, bool shar, BaseView& p);
     /// Constructor for creation
     BaseView(Space& home, ViewArray<VX>& x, VY y, VZ z, int c);
   public:
@@ -296,12 +296,12 @@
     using BaseView<VX,VY,VZ,shr>::atmost;
 
     /// Constructor for cloning \a p
-    EqView(Space& home, bool shr, EqView& p);
+    EqView(Space& home, bool share, EqView& p);
   public:
     /// Constructor for creation
     EqView(Space& home, ViewArray<VX>& x, VY y, VZ z, int c);
     /// Create copy during cloning
-    virtual Actor* copy(Space& home, bool shr);
+    virtual Actor* copy(Space& home, bool share);
     /// Perform propagation
     virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
     /// Post propagator for \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y\}=z+c\f$
@@ -329,12 +329,12 @@
     using BaseView<VX,VY,VZ,shr>::atmost;
 
     /// Constructor for cloning \a p
-    NqView(Space& home, bool shr, NqView& p);
+    NqView(Space& home, bool share, NqView& p);
   public:
     /// Constructor for creation
     NqView(Space& home, ViewArray<VX>& x, VY y, VZ z, int c);
     /// Create copy during cloning
-    virtual Actor* copy(Space& home, bool shr);
+    virtual Actor* copy(Space& home, bool share);
     /// Perform propagation
     virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
     /// Post propagator for \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y\}\neq z+c\f$
@@ -362,12 +362,12 @@
     using BaseView<VX,VY,VZ,shr>::atmost;
 
     /// Constructor for cloning \a p
-    LqView(Space& home, bool shr, LqView& p);
+    LqView(Space& home, bool share, LqView& p);
   public:
     /// Constructor for creation
     LqView(Space& home, ViewArray<VX>& x, VY y, VZ z, int c);
     /// Create copy during cloning
-    virtual Actor* copy(Space& home, bool shr);
+    virtual Actor* copy(Space& home, bool share);
     /// Perform propagation
     virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
     /// Post propagator for \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y\}\leq z+c\f$
@@ -395,7 +395,7 @@
     using BaseView<VX,VY,VZ,shr>::atmost;
 
     /// Constructor for cloning \a p
-    GqView(Space& home, bool shr, GqView& p);
+    GqView(Space& home, bool share, GqView& p);
   public:
     /// Constructor for creation
     GqView(Space& home, ViewArray<VX>& x, VY y, VZ z, int c);

Reply via email to