[CLN-list] [patch] fix compile errors with clang
Pawel Worach
pawel.worach at gmail.com
Sun Jan 30 03:14:11 CET 2011
Hi,
Here are two patches to fix compile errors with clang.
libtool: compile: clang++ -DHAVE_CONFIG_H -I. -I../autoconf -I../include -I../src -I../include -I../src -I/usr/local/include -O2 -pipe -fPIC -fno-strict-aliasing -MT cl_rcpointer2_hashweak_rcpointer.lo -MD -MP -MF .deps/cl_rcpointer2_hashweak_rcpointer.Tpo -c base/hash/cl_rcpointer2_hashweak_rcpointer.cc -fPIC -DPIC -o .libs/cl_rcpointer2_hashweak_rcpointer.o
In file included from base/hash/cl_rcpointer2_hashweak_rcpointer.cc:7:
In file included from ./base/hash/cl_rcpointer2_hashweak_rcpointer.h:8:
In file included from ./base/hash/cl_hash2weak.h:6:
./base/hash/cl_hash2.h:121:13: error: use of undeclared identifier '_garcol_fun'
if (_garcol_fun(this))
^
this->
./base/hash/cl_hash2.h:77:9: note: in instantiation of member function 'cln::cl_heap_hashtable_2<cln::cl_rcpointer, cln::cl_rcpointer, cln::cl_rcpointer>::prepare_store' requested here
prepare_store();
^
base/hash/cl_rcpointer2_hashweak_rcpointer.cc:47:67: note: in instantiation of member function 'cln::cl_heap_hashtable_2<cln::cl_rcpointer, cln::cl_rcpointer, cln::cl_rcpointer>::put' requested here
((cl_heap_weak_hashtable_from_rcpointer2_to_rcpointer*)pointer)->put(x,y,z);
^
In file included from base/hash/cl_rcpointer2_hashweak_rcpointer.cc:7:
In file included from ./base/hash/cl_rcpointer2_hashweak_rcpointer.h:8:
In file included from ./base/hash/cl_hash2weak.h:6:
In file included from ./base/hash/cl_hash2.h:6:
./base/hash/cl_hash.h:36:12: note: must qualify identifier to find this declaration in dependent base class
bool (*_garcol_fun) (cl_heap*); // Function to make room in the table.
^
1 error generated.
--- src/base/hash/cl_hash2.h.orig 2009-05-10 22:32:30.000000000 +0200
+++ src/base/hash/cl_hash2.h 2011-01-30 01:59:01.000000000 +0100
@@ -118,7 +118,7 @@
if (this->_freelist < -1)
return;
// Can we make room?
- if (_garcol_fun(this))
+ if (this->_garcol_fun(this))
if (this->_freelist < -1)
return;
// No! Have to grow the hash table.
@@ -126,7 +126,7 @@
#else
// workaround Sun C++ 4.1 inline function compiler bug
if (this->_freelist >= -1) {
- if (!_garcol_fun(this) || (this->_freelist >= -1))
+ if (!this->_garcol_fun(this) || (this->_freelist >= -1))
grow();
}
#endif
--- src/base/hash/cl_hashuniq.h.orig 2011-01-30 01:57:23.000000000 +0100
+++ src/base/hash/cl_hashuniq.h 2011-01-30 01:58:31.000000000 +0100
@@ -115,7 +115,7 @@
if (this->_freelist < -1)
return;
// Can we make room?
- if (_garcol_fun(this))
+ if (this->_garcol_fun(this))
if (this->_freelist < -1)
return;
// No! Have to grow the hash table.
@@ -123,7 +123,7 @@
#else
// workaround Sun C++ 4.1 inline function compiler bug
if (this->_freelist >= -1) {
- if (!_garcol_fun(this) || (this->_freelist >= -1))
+ if (!this->_garcol_fun(this) || (this->_freelist >= -1))
grow();
}
#endif
--
Pawel
More information about the CLN-list
mailing list