Fix #14850 (Compilation fails on oraclelinux:8 (g++ 8.5.0 released in 2021))#8654
Fix #14850 (Compilation fails on oraclelinux:8 (g++ 8.5.0 released in 2021))#8654danmar wants to merge 5 commits into
Conversation
firewave
left a comment
There was a problem hiding this comment.
This feels like a compiler bug to me.
We should make noexcept optional as a hack for this compiler in question instead of rolling back perfectly valid code.
|
See also https://trac.cppcheck.net/ticket/14851 to make sure such problems are not just platform-specific. |
|
@firewave thanks for your review.. I also feel these errors are pretty weird. do you have some more specifiec suggestion how we hack it.. how about : And then I use NOEXCEPT in the constructor and assignment operator? So when compiling on oraclelinux I will have to provide |
| Settings(Settings&&) noexcept; | ||
| Settings& operator=(Settings&&) noexcept; | ||
| Settings(Settings&&) NOEXCEPT; | ||
| Settings& operator=(Settings&&) NOEXCEPT; |
testing more platforms/compilers sounds good to me. we can easily break stuff.. |
Something along those lines. Using |
I was not sure if it was a g++ 8.5.0 generic bug. Or what versions are affected. but I now see that we can reproduce with godbolt also... |
That code appears to be invalid as it doesn't compile at all regardless of version or compiler. |
yes .. and when I fix that then 8.5 doesn't complain anymore. :-( |
| Settings& operator=(Settings&&) NOEXCEPT; | ||
|
|
||
| static std::string loadCppcheckCfg(Settings& settings, Suppressions& suppressions, bool debug = false); | ||
|
|
| Settings& operator=(Settings&&) NOEXCEPT; | ||
|
|
||
| static std::string loadCppcheckCfg(Settings& settings, Suppressions& suppressions, bool debug = false); | ||
|
|
No description provided.