[Live-devel] Re: building using CC

Sergio Gelato Sergio.Gelato at astro.su.se
Sat Mar 19 13:46:46 PST 2005


On 2004-07-26, Chenglim Ear asked:

> Has anybody had success compiling using CC on solaris?  I'm using 6.2 of
> Sun's workshop and getting some compilation errors.

> "include/BasicHashTable.hh", line 51: Error: BasicHashTable::TableEntry is not accessible from BasicHashTable::Iterator.

This problem still exists with the 2005-03-11 distribution tarball.

On 2004-07-28, Ross Finlayson replied:

> It seems that this compiler has problems with nested C++ classes.  I don't
> think there's an easy way to modify the code to make this compiler happy,
> so I suggest upgrading to a newer version of the compiler, if possible.

I have tried newer versions of the compiler, with identical results.

Sun's documentation implies that they do not consider this behaviour a bug;
see http://www.sun.com/software/sundev/suncc/faqs/cpp.xml#q17 .
Their suggested solution (patch below) appears to work (compile-time test 
only) both with their compiler and with g++ (I tried 2.95 and 3.3.5).

I am not enough of a C++ language lawyer for my opinion to carry much weight,
but I suspect that they are right and the unpatched BasicHashTable.hh is not
standard-conforming.

--- old/BasicUsageEnvironment/include/BasicHashTable.hh	2005-03-11 10:59:39.000000000 +0100
+++ new/BasicUsageEnvironment/include/BasicHashTable.hh	2005-03-19 13:30:00.425148000 +0100
@@ -38,6 +38,8 @@
   virtual ~BasicHashTable();
   
   // Used to iterate through the members of the table:
+  class Iterator;
+  friend class Iterator;
   class Iterator: public HashTable::Iterator {
   public:
     Iterator(BasicHashTable& table);






More information about the live-devel mailing list