Package: avida Version: 2.0b7-2 Severity: normal Tags: patch When building 'avida' on amd64/unstable with gcc-4.0, I get the following error:
fi data_entry.hh: In member function 'bool tDataEntry<T, OUT>::Print(std::ostream&) const': data_entry.hh:97: error: 'target' was not declared in this scope data_entry.hh:98: error: 'target' was not declared in this scope data_entry.hh: In member function 'int tDataEntry<T, OUT>::Compare(T*) const': data_entry.hh:104: error: 'target' was not declared in this scope data_entry.hh: In member function 'bool tDataEntry<T, OUT>::Set(const cString&)': data_entry.hh:109: error: 'target' was not declared in this scope data_entry.hh: In member function 'bool tArgDataEntry<T, OUT, ARG>::Print(std::ostream&) const': data_entry.hh:131: error: 'target' was not declared in this scope data_entry.hh:132: error: 'target' was not declared in this scope data_entry.hh: In member function 'int tArgDataEntry<T, OUT, ARG>::Compare(T*) const': data_entry.hh:138: error: 'target' was not declared in this scope make[3]: *** [data_entry.o] Error 1 make[3]: Leaving directory `/avida-2.0b7/source/tools' With the attached patch 'avida' can be compiled on amd64 using gcc-4.0. Regards Andreas Jochens diff -urN ../tmp-orig/avida-2.0b7/source/tools/data_entry.hh ./source/tools/data_entry.hh --- ../tmp-orig/avida-2.0b7/source/tools/data_entry.hh 2003-05-17 11:48:15.000000000 +0200 +++ ./source/tools/data_entry.hh 2005-04-09 13:14:22.654907371 +0200 @@ -94,19 +94,19 @@ DataSet(_funS), DataCompare(_funC) { ; } bool Print(std::ostream & fp) const { - if (target == NULL) return false; - fp << (target->*DataRetrieval)(); + if (this->target == NULL) return false; + fp << (this->target->*DataRetrieval)(); return true; } - //int Compare(T * other) const { return (target->*DataCompare)(other); } + //int Compare(T * other) const { return (this->target->*DataCompare)(other); } int Compare(T * other) const { - return (DataCompare)?((target->*DataCompare)(other)):(0); + return (DataCompare)?((this->target->*DataCompare)(other)):(0); } bool Set(const cString & value) { OUT new_value(0); if (DataSet == 0) return false; - (target->*DataSet)( cStringUtil::Convert(value, new_value) ); + (this->target->*DataSet)( cStringUtil::Convert(value, new_value) ); return true; } }; @@ -128,14 +128,14 @@ DataRetrieval(_funR), DataCompare(_funC), arg(_arg) { ; } bool Print(std::ostream & fp) const { - if (target == NULL) return false; - fp << (target->*DataRetrieval)(arg); + if (this->target == NULL) return false; + fp << (this->target->*DataRetrieval)(arg); return true; } //int Compare(T * other) const { return (target->*DataCompare)(other, arg); } int Compare(T * other) const { - return (DataCompare)?((target->*DataCompare)(other, arg)):(0); + return (DataCompare)?((this->target->*DataCompare)(other, arg)):(0); } }; -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]