building abiword with HP cc/aCC


Subject: building abiword with HP cc/aCC
From: Tapani Tarvainen (tt@it.jyu.fi)
Date: Wed Jan 16 2002 - 00:59:45 CST


Hi all,

Perhaps foolhardily I'm trying to build AbiWord 0.9.6.1
under HP-UX 11.11 using HP's ANSI C and C++ compilers.
I can work my way through the rather nonportable
configuration stuff (I do use Gnu make though), and most
of the stuff compiles cleanly enough, but now I'm stuck
with abi/src/af/util/xp/ut_map.cpp or actually ut_rbtree.h:
aCC complains that

Error 182: "ut_rbtree.h", line 72 # class Iterator cannot access private member struct Node.
                    Iterator(UT_RBTree* owner, Node* node = 0) : m_pOwner(owner), m_pNode(node) {}
                                               ^^^^
Error 182: "ut_rbtree.h", line 73 # class Iterator cannot access private member struct Node.
                    Node* getNode() { return m_pNode; }
                    ^^^^
Error 182: "ut_rbtree.h", line 74 # class Iterator cannot access private member struct Node.
                    const Node* getNode() const { return m_pNode; }
                          ^^^^
Error 182: "ut_rbtree.h", line 77 # class Iterator cannot access private member struct Node.
                    Node* m_pNode;
                    ^^^^

The code in question looks like this:

        private:
                Iterator(UT_RBTree* owner, Node* node = 0) : m_pOwner(owner), m_pNode(node) {}
                Node* getNode() { return m_pNode; }
                const Node* getNode() const { return m_pNode; }

                UT_RBTree* m_pOwner;
                Node* m_pNode;
                friend class UT_RBTree;
        };

My C++ skills are rather limited. Is there anyone out there who could
say whether that looks like a bug in the compiler or an unportable
or Gnu-specific construct and what could possibly be done about it?

Thank you in advance,

-- 
Tapani Tarvainen



This archive was generated by hypermail 2b25 : Wed Jan 16 2002 - 00:59:52 CST