[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

C++: not defining thrown exceptions produces error, but only on hppa platform


I did upload a new package called `synergy'. It successfully
compiles by the build daemons on all platforms except on `hppa'.

I'm not familiar with C++, so I hope someone can help me.
As far as I have found out, the correpsonding code doesn't
declare thrown methods while they are declared by the methods
of the super class. gcc complains about this. I think it's
a bit strange that it complains on only `hppa', but accepts
the code on any other platform.

Here are the error messages:

g++ -DHAVE_CONFIG_H -I. -I. -I../..     -g -O2   -c -o XBase.o `test -f
XBase.cpp || echo './'`XBase.cpp
In file included from XBase.cpp:15:
XBase.h:33: looser throw specifier for `virtual XBase::~XBase()'
/usr/include/g++-v3/exception:53:   overriding `virtual 
   std::exception::~exception() throw ()'
XBase.h:36: looser throw specifier for `virtual const char*
/usr/include/g++-v3/exception:56:   overriding `virtual const char* 
   std::exception::what() const throw ()'

The corresponding error reports are located at:

all platforms:


Excerpt from XBase.h:

    virtual ~XBase();
    virtual const char* what() const;

Excerpt from /usr/include/g++-v3/exception:

    virtual ~exception() throw();
    virtual const char* what() const throw();

I assume this is not a problem concerning hppa, but this is
a problem of the C++ source code of synergy. So I decided to ask
first on this list before asking to the hppa mailing list.

I assume it's an error not to delcare exceptions while the super class
does. Is my assumption correct? If yes, I will try to fix it and contact
the upstream autor.


Reply to: