Skip to content

Modify -Wreturn-type and add -Wreturn-mismatch from GCC 14 #72116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
AaronBallman opened this issue Nov 13, 2023 · 0 comments · Fixed by #82872
Closed

Modify -Wreturn-type and add -Wreturn-mismatch from GCC 14 #72116

AaronBallman opened this issue Nov 13, 2023 · 0 comments · Fixed by #82872
Labels
clang:diagnostics New/improved warning or error message in Clang, but not in clang-tidy or static analyzer enhancement Improving things as opposed to bug fixing, e.g. new or missing feature quality-of-implementation

Comments

@AaronBallman
Copy link
Collaborator

GCC 14 modified the way -Wreturn-type behaves to split some of its functionality off into -Wreturn-mismatch and strengthened some of the diagnostics to be errors by default (with the intention of making them permaerrors in the future). Clang already considers many of these cases to be errors by default already, but we should pick up the new warning flag and try to split our diagnostics similarly for compatibility reasons.

From https://discourse.llvm.org/t/gcc-14-adds-wreturn-mismatch/74868/1

@AaronBallman AaronBallman added enhancement Improving things as opposed to bug fixing, e.g. new or missing feature quality-of-implementation clang:diagnostics New/improved warning or error message in Clang, but not in clang-tidy or static analyzer labels Nov 13, 2023
AaronBallman pushed a commit that referenced this issue Mar 11, 2024
This pull request fixes #72116 where a new flag is introduced for
compatibility with GCC 14, the functionality of -Wreturn-type is
modified to split some of its behaviors into -Wreturn-mismatch

Fixes #72116
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:diagnostics New/improved warning or error message in Clang, but not in clang-tidy or static analyzer enhancement Improving things as opposed to bug fixing, e.g. new or missing feature quality-of-implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant