Skip to content

In C++ mode do not warn about inline combined with noinline [GH #183] - #251

Merged
daveedvdv-nvidia merged 1 commit into
edgcpp:mainfrom
mborland:fix/183
Oct 22, 2026
Merged

daveedvdv-nvidia merged 1 commit into
edgcpp:mainfrom
mborland:fix/183

Conversation

@mborland

@mborland mborland commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

In GCC when using C++ you are allowed to combine inline and no inline without warning, which is a common idiom in Boost. In plain C mode GCC warns. This PR changes to match the GCC behavior or not warning in C++ mode, as previously it warned in both.

Closes: #183

@daveedvdv-nvidia daveedvdv-nvidia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A question about whether this is desired in Clang C++ mode in addition to GNU C++ mode.

Comment thread src/attribute.c
Comment thread src/Changes Outdated
@daveedvdv-nvidia

Copy link
Copy Markdown
Contributor

I'll merge after the CI checks have completed (even though this is just wording changes).

@daveedvdv-nvidia

Copy link
Copy Markdown
Contributor

A last-minute agentic review found some minor issues... I'll let it devise a patch.

@daveedvdv-nvidia

Copy link
Copy Markdown
Contributor

@mborland : Can you review the commit I added to the PR?

@edgcpp-bot

Copy link
Copy Markdown
Collaborator

AcknowlEDG review results updated for ca088ffd527d:

CI success.

@mborland

Copy link
Copy Markdown
Contributor Author

@mborland : Can you review the commit I added to the PR?

Looks good to me. Thank you!

@daveedvdv-nvidia
daveedvdv-nvidia merged commit 4047642 into edgcpp:main Oct 22, 2026
11 of 13 checks passed
@coderabbitai

coderabbitai Bot commented Oct 22, 2026

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 33dfd8d0-6e99-440d-8c28-bd32cca71229
📥 Commits

Reviewing files that changed from the base of the PR and between ec2f12c and 4047642.

⛔ Files ignored due to path filters: 2
  • tests/expectations/edg_x86_32_cp/regressions.log is excluded by !**/*.log
  • tests/expectations/edg_x86_64_cp/regressions.log is excluded by !**/*.log
📒 Files selected for processing: 21
  • src/attribute.c
  • src/decls.c
  • src/decls.h
  • src/func_def.c
  • src/il.c
  • src/pending_changes/gh-183-inline-noinline.txt
  • tests/tests/imported/gnu/cpp/.Wattributes-3.rto/default.1.1.txt
  • tests/tests/imported/gnu/cpp/ext/.attr-noinline-2.rto/default.1.1.txt
  • tests/tests/imported/gnu/cpp/ext/.attr-noinline.rto/default.1.1.txt
  • tests/tests/imported/gnu/cpp/gcov/.gcov-10.rto/default.1.1.txt
  • tests/tests/imported/gnu/cpp/ipa/.nothrow-1.rto/default.1.1.txt
  • tests/tests/imported/gnu/cpp/ipa/.pure-const-1.rto/default.1.1.txt
  • tests/tests/imported/gnu/cpp/ipa/.pure-const-2.rto/default.1.1.txt
  • tests/tests/imported/gnu/cpp/ipa/.pure-const-3.rto/default.1.1.txt
  • tests/tests/imported/gnu/cpp/ipa/.pure-const-3b.rto/default.1.1.txt
  • tests/tests/regressions/.gh-183-negative.rto/default.1.1.txt
  • tests/tests/regressions/.gh-183-redecl.rto/default.1.1.txt
  • tests/tests/regressions/.gh-183.rto/default.1.1.txt
  • tests/tests/regressions/gh-183-negative.sft.cpp
  • tests/tests/regressions/gh-183-redecl.sft.cpp
  • tests/tests/regressions/gh-183.sft.cpp
+--------------------------------------------------------------------------------------------------------------------------+
| Unix was not designed to stop its users from doing stupid things, as that would also stop them from doing clever things. |
+--------------------------------------------------------------------------------------------------------------------------+
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@mborland
mborland deleted the fix/183 branch October 22, 2026 19:05
@codecov

codecov Bot commented Oct 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.23810% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/attribute.c 93.33% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

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.

inline + noinline warns although GCC does not

3 participants