Skip to content

Fix #14850 (Compilation fails on oraclelinux:8 (g++ 8.5.0 released in 2021))#8654

Open
danmar wants to merge 1 commit into
cppcheck-opensource:mainfrom
cppchecksolutions:fix-14850
Open

Fix #14850 (Compilation fails on oraclelinux:8 (g++ 8.5.0 released in 2021))#8654
danmar wants to merge 1 commit into
cppcheck-opensource:mainfrom
cppchecksolutions:fix-14850

Conversation

@danmar

@danmar danmar commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread lib/settings.h Fixed

@firewave firewave left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@firewave

Copy link
Copy Markdown
Collaborator

See also https://trac.cppcheck.net/ticket/14851 to make sure such problems are not just platform-specific.

@danmar

danmar commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator Author

@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 :

#ifdef GCC_BUG_HACK_NOEXCEPT
#define  NOEXCEPT
#else 
#define  NOEXCEPT  noexcept
#endif

And then I use NOEXCEPT in the constructor and assignment operator?

So when compiling on oraclelinux I will have to provide -DGCC_BUG_HACK_NOEXCEPT

Comment thread lib/settings.h
Settings(Settings&&) noexcept;
Settings& operator=(Settings&&) noexcept;
Settings(Settings&&) NOEXCEPT;
Settings& operator=(Settings&&) NOEXCEPT;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants