Skip to content
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

Assign -Wno-keyword-compat to clang only #35

Closed

Conversation

skuenzer
Copy link
Member

@skuenzer skuenzer commented Aug 31, 2023

The compiler flag -Wno-keyword-compat is not recognized by GCC, but by clang. Although it does not harm the resulting compilation unit (GCC has a special handling of -Wno-* flags), an additional warning message is issued if a compilation unit fails or produces other warnings (tested with GCC 13.2):

At global scope:
cc1plus: note: unrecognized command-line option '-Wno-keyword-compat' may have been intended to silence earlier diagnostics

This PR assigns -Wno-keyword-compat to clang only.

The compiler flag `-Wno-keyword-compat` is not recognized by GCC, but by
clang. Although it does not harm the resulting compilation unit (GCC has a
special handling of `-Wno-*` flags), an additional warning message is issued if
a compilation unit fails or produces other warnings:

```
At global scope:
cc1plus: note: unrecognized command-line option '-Wno-keyword-compat' may have been intended to silence earlier diagnostics
```

This commit assigns `-Wno-keyword-compat` to clang only.

Signed-off-by: Simon Kuenzer <simon@unikraft.io>
Copy link
Member

@mschlumpp mschlumpp left a comment

Choose a reason for hiding this comment

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

Reviewed-by: Marco Schlumpp marco@unikraft.io

@razvand razvand requested a review from StefanJum August 31, 2023 09:41
@razvand razvand self-assigned this Aug 31, 2023
@razvand razvand added the enhancement New feature or request label Aug 31, 2023
Copy link
Member

@StefanJum StefanJum left a comment

Choose a reason for hiding this comment

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

All good, thanks.
Reviewed-by: Stefan Jumarea stefanjumarea02@gmail.com

Copy link

@razvand razvand left a comment

Choose a reason for hiding this comment

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

Approved-by: Razvan Deaconescu razvand@unikraft.io

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/merged enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants