I'm catching a warning under Clang when testing a library under C++11. I've never come across the warning before and searching is not providing too much in the way of reading and research.
The warning is shown below, and it appears to be related to multiple inheritance and a common base class. But I'm not clear on the details triggering the warning or what I should do to address it.
My first question is, Is this a problem that needs to be addressed? Or is it a matter of efficiency alone?
My second question is (if needed), How do I address the warning? Or what are the options available to remediate it?
Here is some additional information:
- Compiler: Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
- g++ -DDEBUG -g2 -O2 -std=c++11 -fPIC -march=native -pipe -c test.cpp
Is also reviewed the following on Stack Overflow, but its not clear to me where they intersect:
The library, Crypto++, also make heavy use of Curiously Recurring Template Pattern for compile time polymorphism.
The the header file is available online, and here is the actual warning:
g++ -DDEBUG -g2 -O2 -std=c++11 -Wno-deprecated-declarations -fPIC -march=native -pipe -c rsa.cpp
In file included from rsa.cpp:4:
In file included from ./rsa.h:12:
./pubkey.h:635:26: warning: defaulted move assignment operator of 'InvertibleRSAFunction' will move assign virtual base class 'CryptoMaterial' multiple times [-Wmultiple-move-vbase]
class CRYPTOPP_NO_VTABLE TF_ObjectImpl : public TF_ObjectImplBase<BASE, SCHEME_OPTIONS, KEY_CLASS>
^
./rsa.h:57:44: note: 'CryptoMaterial' is a virtual base class of base class 'CryptoPP::RSAFunction' declared here
class CRYPTOPP_DLL InvertibleRSAFunction : public RSAFunction, public TrapdoorFunctionInverse, public PKCS8PrivateKey
^~~~~~~~~~~~~~~~~~
./rsa.h:57:96: note: 'CryptoMaterial' is a virtual base class of base class 'CryptoPP::PKCS8PrivateKey' declared here
class CRYPTOPP_DLL InvertibleRSAFunction : public RSAFunction, public TrapdoorFunctionInverse, public PKCS8PrivateKey
^
1 warning generated.
My apologies for not reducing it. I'm not sure how to reduce it and capture the essence of the warning/complaint.
Aucun commentaire:
Enregistrer un commentaire