Another issue with the SunStudio compiler

Alexander Neundorf neundorf at kde.org
Fri Dec 18 23:03:44 CET 2009


Hi,

in kdelibs, khtml, there is another SunStudio compiler error:
http://my.cdash.org/viewBuildError.php?buildid=41969:

"/.../srcdir/khtml/xml/dom_elementimpl.h", line 135: Error: Different types 
for "?:" (DOM::DOMStringImpl*const and bool).

This is line 135:
  DOMStringImpl *val() const { return m_localName.id() ? m_data.value :
                                                         m_data.attr->val(); }


m_data.value is a DOMStringImpl:

    union {
        DOMStringImpl *value;
        AttrImpl *attr;
    } m_data;


and AttrImpl::val() also returns a DOMStringImpl* :

class AttrImpl : public NodeBaseImpl
{
...
    DOMStringImpl *val() { return m_value; }


So, what does the compiler consider a bool here ?

Alex


More information about the Kde-buildsystem mailing list