The destructors ~casAsyncReadIO, ~casAsyncWriteIO, ~casAsyncPVExistIO and ~casAsyncPVAttachIO throw exceptions. This is no longer allowed from C++11 on and the compilers issue warnings:
gcc:
../../../../src/pcas/generic/casAsyncPVExistIO.cc: In destructor ‘virtual casAsyncPVExistIO::~casAsyncPVExistIO()’:
../../../../src/pcas/generic/casAsyncPVExistIO.cc:35:9: warning: ‘throw’ will always call ‘terminate’ [-Wterminate]
35 | throw std::logic_error (
| ^~~~~~~~~~~~~~~~~~~~~~~~
36 | "the server library *must* initiate asynchronous IO destroy" );
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../src/pcas/generic/casAsyncPVExistIO.cc:35:9: note: in C++11 destructors default to ‘noexcept’
clang:
../../../../src/pcas/generic/casAsyncPVExistIO.cc:35:9: warning: '~casAsyncPVExistIO' has a non-throwing exception specification but can still throw [-Wexceptions]
35 | throw std::logic_error (
| ^
../../../../src/pcas/generic/casAsyncPVExistIO.cc:32:20: note: destructor has a implicit non-throwing exception specification
32 | casAsyncPVExistIO::~casAsyncPVExistIO ()
| ^
Windows cl:
src\pcas\generic\casAsyncPVExistIO.cc(35): warning C4297: 'casAsyncPVExistIO::~casAsyncPVExistIO': function assumed not to throw an exception but does
src\pcas\generic\casAsyncPVExistIO.cc(35): note: destructor or deallocator has a (possibly implicit) non-throwing exception specification
Not sure how best address this. Ignoring it? Simply adding noexcept(false) "everywhere"? Rewriting the destructors not to throw? But how?
The destructors
~casAsyncReadIO,~casAsyncWriteIO,~casAsyncPVExistIOand~casAsyncPVAttachIOthrow exceptions. This is no longer allowed from C++11 on and the compilers issue warnings:gcc:
clang:
Windows cl:
Not sure how best address this. Ignoring it? Simply adding
noexcept(false)"everywhere"? Rewriting the destructors not to throw? But how?