Fix mono's Wsingle-bit-bitfield-constant-conversion#90068
Merged
vargaz merged 2 commits intodotnet:mainfrom Aug 6, 2023
Merged
Fix mono's Wsingle-bit-bitfield-constant-conversion#90068vargaz merged 2 commits intodotnet:mainfrom
vargaz merged 2 commits intodotnet:mainfrom
Conversation
Contributor
|
Looks ok, but the new types should be consistent, i.e. use |
Member
Author
I've followed the type nearby code was preferring. e.g. jit-info.h has number of existing bitfields using guint32. |
vargaz
approved these changes
Aug 6, 2023
akoeplinger
reviewed
Aug 29, 2023
| 1. For the special anonymous containers kept by MonoImage. | ||
| 2. When user code creates a generic parameter via SRE, but has not yet set an owner. */ | ||
| int is_anonymous : 1; | ||
| gint is_anonymous : 1; |
Member
There was a problem hiding this comment.
@am11 these still raise the warning in main, should this have been guint?
/__w/1/s/src/mono/mono/metadata/sre.c:1626:33: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
generic_container->is_method = TRUE;
^ ~~~~
/__w/1/s/src/mono/mono/metadata/sre.c:1631:36: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
generic_container->is_anonymous = TRUE;
^ ~~~~
Member
Author
There was a problem hiding this comment.
Thanks, yes guint is correct.
akoeplinger
added a commit
to akoeplinger/runtime
that referenced
this pull request
Aug 30, 2023
It was supposed to be fixed in dotnet#90068 but we should've used `guint` for the one-bit bitfield.
akoeplinger
added a commit
that referenced
this pull request
Aug 30, 2023
It was supposed to be fixed in #90068 but we should've used `guint` for the one-bit bitfield.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warnings are of the form:
reported on linux-x64 build (with cc: clang 17 rc1).