diff --git a/include/cln/object.h b/include/cln/object.h index 2e03eb6..56f6f07 100644 --- a/include/cln/object.h +++ b/include/cln/object.h @@ -327,11 +327,7 @@ public: cl_private_thing _as_cl_private_thing () const; // Private constructor. cl_gcobject (cl_private_thing p) - #if !(defined(__alpha__) && !defined(__GNUC__)) : pointer (p) {} - #else - { pointer = p; } - #endif // Debugging output. void debug_print () const; // Ability to place an object at a given address. @@ -377,11 +373,7 @@ public: cl_private_thing _as_cl_private_thing () const; // Private constructor. cl_gcpointer (cl_private_thing p) - #if !(defined(__alpha__) && !defined(__GNUC__)) : pointer (p) {} - #else - { pointer = p; } - #endif // Debugging output. void debug_print () const; // Ability to place an object at a given address. @@ -427,11 +419,7 @@ public: cl_private_thing _as_cl_private_thing () const; // Private constructor. cl_rcobject (cl_private_thing p) - #if !(defined(__alpha__) && !defined(__GNUC__)) : pointer (p) {} - #else - { pointer = p; } - #endif // Debugging output. void debug_print () const; // Ability to place an object at a given address. @@ -477,11 +465,7 @@ public: cl_private_thing _as_cl_private_thing () const; // Private constructor. cl_rcpointer (cl_private_thing p) - #if !(defined(__alpha__) && !defined(__GNUC__)) : pointer (p) {} - #else - { pointer = p; } - #endif // Debugging output. void debug_print () const; // Ability to place an object at a given address. diff --git a/include/cln/symbol.h b/include/cln/symbol.h index ea59d28..6469187 100644 --- a/include/cln/symbol.h +++ b/include/cln/symbol.h @@ -9,10 +9,6 @@ namespace cln { // Symbols are just strings, uniquified through a global hash table. -#if (defined(__alpha__) && !defined(__GNUC__)) -struct hashuniq; -#endif - struct cl_symbol : public cl_rcpointer { public: // Conversion to string. diff --git a/src/base/cl_macros.h b/src/base/cl_macros.h index 158398d..1679e44 100644 --- a/src/base/cl_macros.h +++ b/src/base/cl_macros.h @@ -242,22 +242,12 @@ // Inside a class definition: // Overload `new' so that a class object can be allocated anywhere. -#if !((defined(__rs6000__) || defined(__alpha__)) && !defined(__GNUC__)) #define ALLOCATE_ANYWHERE(classname) \ /* Ability to place an object at a given address. */ \ public: \ void* operator new (size_t size) { return malloc_hook(size); } \ void* operator new (size_t size, classname* ptr) { unused size; return ptr; } \ void operator delete (void* ptr) { free_hook(ptr); } -#else -// For some compilers, work around template problem with "classname". -#define ALLOCATE_ANYWHERE(classname) \ - /* Ability to place an object at a given address. */ \ -public: \ - void* operator new (size_t size) { return malloc_hook(size); } \ - void* operator new (size_t size, void* ptr) { unused size; return ptr; } \ - void operator delete (void* ptr) { free_hook(ptr); } -#endif // init1(type, object) (value); // initializes `object' with `value', by calling `type''s constructor. diff --git a/src/base/hash/cl_hash.h b/src/base/hash/cl_hash.h index f211e9e..1ab1c2b 100644 --- a/src/base/hash/cl_hash.h +++ b/src/base/hash/cl_hash.h @@ -131,9 +131,7 @@ protected: _freelist = _entries[index].next; return index; } - #if !(defined(__hppa__) && !defined(__GNUC__)) // workaround HP CC problem throw runtime_exception(); - #endif return -1; // dummy } // Put a free index into the free list. @@ -149,9 +147,7 @@ private: template struct _cl_hashtable_iterator - #if !(defined(__mips__) && !defined(__GNUC__)) // workaround SGI CC bug : cl_abstract_iterator - #endif { private: typename cl_heap_hashtable::htxentry * _entries; diff --git a/src/base/hash/cl_hash1.h b/src/base/hash/cl_hash1.h index 417be1b..397bcba 100644 --- a/src/base/hash/cl_hash1.h +++ b/src/base/hash/cl_hash1.h @@ -12,10 +12,6 @@ namespace cln { // - function bool equal (key1_type,key1_type); // - function unsigned long hashcode (key1_type); -#if (defined(__alpha__) && !defined(__GNUC__)) -template struct cl_htentry1; -#endif - template struct cl_htentry1 { ALLOCATE_ANYWHERE(cl_htentry1) @@ -24,9 +20,6 @@ struct cl_htentry1 { const value_type& htvalue () { return val; } cl_htentry1 (const key1_type& k, const value_type& v) : key (k), val (v) {} -#if (defined(__rs6000__) && !defined(__GNUC__)) - cl_htentry1 () {} -#endif }; template @@ -113,7 +106,6 @@ private: // This may change the table's size! void prepare_store () { - #if !(defined(__sparc__) && !defined(__GNUC__)) if (this->_freelist < -1) return; // Can we make room? @@ -122,13 +114,6 @@ private: return; // No! Have to grow the hash table. grow(); - #else - // workaround Sun C++ 4.1 inline function compiler bug - if (this->_freelist >= -1) { - if (!this->_garcol_fun(this) || (this->_freelist >= -1)) - grow(); - } - #endif } void grow () { diff --git a/src/base/hash/cl_hash2.h b/src/base/hash/cl_hash2.h index 66593ae..bdf9f00 100644 --- a/src/base/hash/cl_hash2.h +++ b/src/base/hash/cl_hash2.h @@ -22,9 +22,6 @@ struct cl_htentry2 { const value_type& htvalue () { return val; } cl_htentry2 (const key1_type& k1, const key2_type& k2, const value_type& v) : key1 (k1), key2 (k2), val (v) {} -#if (defined(__rs6000__) && !defined(__GNUC__)) - cl_htentry2 () {} -#endif }; template @@ -114,7 +111,6 @@ private: // This may change the table's size! void prepare_store () { - #if !(defined(__sparc__) && !defined(__GNUC__)) if (this->_freelist < -1) return; // Can we make room? @@ -123,13 +119,6 @@ private: return; // No! Have to grow the hash table. grow(); - #else - // workaround Sun C++ 4.1 inline function compiler bug - if (this->_freelist >= -1) { - if (!this->_garcol_fun(this) || (this->_freelist >= -1)) - grow(); - } - #endif } void grow () { diff --git a/src/base/hash/cl_hashset.h b/src/base/hash/cl_hashset.h index bdf5e52..b2a60ee 100644 --- a/src/base/hash/cl_hashset.h +++ b/src/base/hash/cl_hashset.h @@ -100,7 +100,6 @@ private: // This may change the table's size! void prepare_store () { - #if !(defined(__sparc__) && !defined(__GNUC__)) if (this->_freelist < -1) return; // Can we make room? @@ -109,13 +108,6 @@ private: return; // No! Have to grow the hash table. grow(); - #else - // workaround Sun C++ 4.1 inline function compiler bug - if (this->_freelist >= -1) { - if (!this->_garcol_fun(this) || (this->_freelist >= -1)) - grow(); - } - #endif } void grow () { diff --git a/src/base/hash/cl_hashuniq.h b/src/base/hash/cl_hashuniq.h index b19b5dd..c2b4bab 100644 --- a/src/base/hash/cl_hashuniq.h +++ b/src/base/hash/cl_hashuniq.h @@ -24,9 +24,6 @@ struct cl_htuniqentry { const value_type& htvalue () { return val; } cl_htuniqentry (const value_type& v) : val (v) {} -#if (defined(__rs6000__) && !defined(__GNUC__)) - cl_htuniqentry () {} -#endif }; template @@ -111,7 +108,6 @@ private: // This may change the table's size! void prepare_store () { - #if !(defined(__sparc__) && !defined(__GNUC__)) if (this->_freelist < -1) return; // Can we make room? @@ -120,13 +116,6 @@ private: return; // No! Have to grow the hash table. grow(); - #else - // workaround Sun C++ 4.1 inline function compiler bug - if (this->_freelist >= -1) { - if (!this->_garcol_fun(this) || (this->_freelist >= -1)) - grow(); - } - #endif } void grow () { diff --git a/src/base/hash/cl_rcpointer2_hashweak_rcpointer.cc b/src/base/hash/cl_rcpointer2_hashweak_rcpointer.cc index 749e358..4d6d0f2 100644 --- a/src/base/hash/cl_rcpointer2_hashweak_rcpointer.cc +++ b/src/base/hash/cl_rcpointer2_hashweak_rcpointer.cc @@ -15,11 +15,7 @@ namespace cln { static void cl_weak_hashtable_from_rcpointer2_to_rcpointer_destructor (cl_heap* pointer) { -#if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug - (*(cl_heap_weak_hashtable_from_rcpointer2_to_rcpointer*)pointer).~cl_heap_weak_hashtable_2(); -#else (*(cl_heap_weak_hashtable_from_rcpointer2_to_rcpointer*)pointer).~cl_heap_weak_hashtable_from_rcpointer2_to_rcpointer(); -#endif } cl_class cl_class_weak_hashtable_from_rcpointer2_to_rcpointer = { diff --git a/src/base/hash/cl_rcpointer_hashweak_rcpointer.cc b/src/base/hash/cl_rcpointer_hashweak_rcpointer.cc index 31d7e23..a60348d 100644 --- a/src/base/hash/cl_rcpointer_hashweak_rcpointer.cc +++ b/src/base/hash/cl_rcpointer_hashweak_rcpointer.cc @@ -15,11 +15,7 @@ namespace cln { static void cl_weak_hashtable_from_rcpointer_to_rcpointer_destructor (cl_heap* pointer) { -#if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug - (*(cl_heap_weak_hashtable_from_rcpointer_to_rcpointer*)pointer).~cl_heap_weak_hashtable_1(); -#else (*(cl_heap_weak_hashtable_from_rcpointer_to_rcpointer*)pointer).~cl_heap_weak_hashtable_from_rcpointer_to_rcpointer(); -#endif } cl_class cl_class_weak_hashtable_from_rcpointer_to_rcpointer = { diff --git a/src/base/symbol/cl_symbol.cc b/src/base/symbol/cl_symbol.cc index f80f58f..8e38f71 100644 --- a/src/base/symbol/cl_symbol.cc +++ b/src/base/symbol/cl_symbol.cc @@ -31,11 +31,7 @@ typedef _cl_hashtable_iterator cl_hashtable_fr static void cl_hashtable_from_string_to_symbol_destructor (cl_heap* pointer) { -#if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug - (*(cl_heap_hashtable_from_string_to_symbol*)pointer).~cl_heap_weak_hashtable_uniq(); -#else (*(cl_heap_hashtable_from_string_to_symbol*)pointer).~cl_heap_hashtable_from_string_to_symbol(); -#endif } diff --git a/src/float/transcendental/cl_LF_pi.cc b/src/float/transcendental/cl_LF_pi.cc index 78e844e..3b537ad 100644 --- a/src/float/transcendental/cl_LF_pi.cc +++ b/src/float/transcendental/cl_LF_pi.cc @@ -181,12 +181,6 @@ const cl_LF compute_pi_ramanujan_163 (uintC len) } // Bit complexity (N := len): O(N^2). -#if defined(__mips__) && !defined(__GNUC__) // workaround SGI CC bug -#define A A_fast -#define B B_fast -#define J3 J3_fast -#endif - const cl_LF compute_pi_ramanujan_163_fast (uintC len) { // Same formula as above, using a binary splitting evaluation. diff --git a/src/integer/hash/cl_I_hash_gcobject.cc b/src/integer/hash/cl_I_hash_gcobject.cc index 3eb9f15..1d2b03a 100644 --- a/src/integer/hash/cl_I_hash_gcobject.cc +++ b/src/integer/hash/cl_I_hash_gcobject.cc @@ -16,11 +16,7 @@ namespace cln { static void cl_hashtable_from_integer_to_gcobject_destructor (cl_heap* pointer) { -#if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug - (*(cl_heap_hashtable_from_integer_to_gcobject*)pointer).~cl_heap_hashtable_1(); -#else (*(cl_heap_hashtable_from_integer_to_gcobject*)pointer).~cl_heap_hashtable_from_integer_to_gcobject(); -#endif } cl_class cl_class_hashtable_from_integer_to_gcobject = { diff --git a/src/integer/hash/cl_I_hash_gcpointer.cc b/src/integer/hash/cl_I_hash_gcpointer.cc index f6d2202..0c4f336 100644 --- a/src/integer/hash/cl_I_hash_gcpointer.cc +++ b/src/integer/hash/cl_I_hash_gcpointer.cc @@ -16,11 +16,7 @@ namespace cln { static void cl_hashtable_from_integer_to_gcpointer_destructor (cl_heap* pointer) { -#if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug - (*(cl_heap_hashtable_from_integer_to_gcpointer*)pointer).~cl_heap_hashtable_1(); -#else (*(cl_heap_hashtable_from_integer_to_gcpointer*)pointer).~cl_heap_hashtable_from_integer_to_gcpointer(); -#endif } cl_class cl_class_hashtable_from_integer_to_gcpointer = { diff --git a/src/integer/hash/cl_I_hash_pointer.cc b/src/integer/hash/cl_I_hash_pointer.cc index c1ed150..a36dd32 100644 --- a/src/integer/hash/cl_I_hash_pointer.cc +++ b/src/integer/hash/cl_I_hash_pointer.cc @@ -16,11 +16,7 @@ namespace cln { static void cl_hashtable_from_integer_to_pointer_destructor (cl_heap* pointer) { -#if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug - (*(cl_heap_hashtable_from_integer_to_pointer*)pointer).~cl_heap_hashtable_1(); -#else (*(cl_heap_hashtable_from_integer_to_pointer*)pointer).~cl_heap_hashtable_from_integer_to_pointer(); -#endif } cl_class cl_class_hashtable_from_integer_to_pointer = { diff --git a/src/integer/hash/cl_I_hash_rcobject.cc b/src/integer/hash/cl_I_hash_rcobject.cc index d77b53f..f1ea063 100644 --- a/src/integer/hash/cl_I_hash_rcobject.cc +++ b/src/integer/hash/cl_I_hash_rcobject.cc @@ -16,11 +16,7 @@ namespace cln { static void cl_hashtable_from_integer_to_rcobject_destructor (cl_heap* pointer) { -#if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug - (*(cl_heap_hashtable_from_integer_to_rcobject*)pointer).~cl_heap_hashtable_1(); -#else (*(cl_heap_hashtable_from_integer_to_rcobject*)pointer).~cl_heap_hashtable_from_integer_to_rcobject(); -#endif } cl_class cl_class_hashtable_from_integer_to_rcobject = { diff --git a/src/integer/hash/cl_I_hash_rcpointer.cc b/src/integer/hash/cl_I_hash_rcpointer.cc index 8ef2ae6..744f328 100644 --- a/src/integer/hash/cl_I_hash_rcpointer.cc +++ b/src/integer/hash/cl_I_hash_rcpointer.cc @@ -16,11 +16,7 @@ namespace cln { static void cl_hashtable_from_integer_to_rcpointer_destructor (cl_heap* pointer) { -#if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug - (*(cl_heap_hashtable_from_integer_to_rcpointer*)pointer).~cl_heap_hashtable_1(); -#else (*(cl_heap_hashtable_from_integer_to_rcpointer*)pointer).~cl_heap_hashtable_from_integer_to_rcpointer(); -#endif } cl_class cl_class_hashtable_from_integer_to_rcpointer = { diff --git a/src/integer/hash/cl_I_hashweak_rcpointer.cc b/src/integer/hash/cl_I_hashweak_rcpointer.cc index ef126a3..e1e507b 100644 --- a/src/integer/hash/cl_I_hashweak_rcpointer.cc +++ b/src/integer/hash/cl_I_hashweak_rcpointer.cc @@ -16,11 +16,7 @@ namespace cln { static void cl_weak_hashtable_from_integer_to_rcpointer_destructor (cl_heap* pointer) { -#if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug - (*(cl_heap_weak_hashtable_from_integer_to_rcpointer*)pointer).~cl_heap_weak_hashtable_1(); -#else (*(cl_heap_weak_hashtable_from_integer_to_rcpointer*)pointer).~cl_heap_weak_hashtable_from_integer_to_rcpointer(); -#endif } cl_class cl_class_weak_hashtable_from_integer_to_rcpointer = { diff --git a/src/modinteger/cl_MI_int.h b/src/modinteger/cl_MI_int.h index f8e6f78..6abac3c 100644 --- a/src/modinteger/cl_MI_int.h +++ b/src/modinteger/cl_MI_int.h @@ -32,9 +32,6 @@ static const _cl_MI int_random (cl_heap_modint_ring* R, random_state& randomstat unused R; unused randomstate; throw runtime_exception("Z / 0 Z not a finite set - no equidistributed random function."); -#if ((defined(__sparc__) || defined(__sparc64__)) && !defined(__GNUC__)) // Sun CC wants a return value - return _cl_MI(R, 0); -#endif } static const _cl_MI int_zero (cl_heap_modint_ring* R) diff --git a/src/vector/cl_GV_I.cc b/src/vector/cl_GV_I.cc index 3a54560..624388b 100644 --- a/src/vector/cl_GV_I.cc +++ b/src/vector/cl_GV_I.cc @@ -27,11 +27,7 @@ namespace cln { static void cl_gvector_integer_destructor (cl_heap* pointer) { -#if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug - (*(cl_heap_GV_I*)pointer).~cl_heap_GV(); -#else (*(cl_heap_GV_I*)pointer).~cl_heap_GV_I(); -#endif } // XXX: Ugh, this needs to be non-const (and non-static) for overriding diff --git a/src/vector/cl_GV_number.cc b/src/vector/cl_GV_number.cc index fecf25f..fc19449 100644 --- a/src/vector/cl_GV_number.cc +++ b/src/vector/cl_GV_number.cc @@ -16,11 +16,7 @@ namespace cln { static void cl_gvector_number_destructor (cl_heap* pointer) { -#if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug - (*(cl_heap_GV_number*)pointer).~cl_heap_GV(); -#else (*(cl_heap_GV_number*)pointer).~cl_heap_GV_number(); -#endif } // XXX: this ought to be const, but it would be impossible to register diff --git a/src/vector/cl_SV_number.cc b/src/vector/cl_SV_number.cc index 2c29838..c95f688 100644 --- a/src/vector/cl_SV_number.cc +++ b/src/vector/cl_SV_number.cc @@ -12,11 +12,7 @@ namespace cln { static void cl_svector_number_destructor (cl_heap* pointer) { -#if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug - (*(cl_heap_SV_number*)pointer).~cl_heap_SV(); -#else (*(cl_heap_SV_number*)pointer).~cl_heap_SV_number(); -#endif } // XXX: ugh, this needs to be non-static (and non-const) so redefining diff --git a/src/vector/cl_SV_ringelt.cc b/src/vector/cl_SV_ringelt.cc index d2bbedc..225470f 100644 --- a/src/vector/cl_SV_ringelt.cc +++ b/src/vector/cl_SV_ringelt.cc @@ -13,11 +13,7 @@ namespace cln { static void cl_svector_ringelt_destructor (cl_heap* pointer) { -#if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug - (*(cl_heap_SV_ringelt*)pointer).~cl_heap_SV(); -#else (*(cl_heap_SV_ringelt*)pointer).~cl_heap_SV_ringelt(); -#endif } // XXX: this ought to be static const, but it would be impossible to