-
Notifications
You must be signed in to change notification settings - Fork 204
gccrs: Implement typecheck for zero-variant enums #3686
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
Conversation
philberty
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just minor style thing and add in another fix please.
0d46f58 to
eb4793e
Compare
gcc/rust/ChangeLog: * typecheck/rust-tyty.h: Add new `ReprKind` enum to `ReprOptions`. * typecheck/rust-hir-type-check-base.cc: Handle setting of `repr_kind`. * typecheck/rust-hir-type-check-item.cc: New check for zero-variant enums. Signed-off-by: Yap Zhi Heng <yapzhhg@gmail.com>
gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-base.cc: Set enum representing type properly if repr is an integer type. * typecheck/rust-hir-type-check-item.cc: Update comments. Signed-off-by: Yap Zhi Heng <yapzhhg@gmail.com>
philberty
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just minor change to that comment then looks good to go
gcc/rust/ChangeLog: * typecheck/rust-tyty.h: Remove extra redundant comment. * typecheck/rust-hir-type-check-base.cc: Update comment on repr handling. Signed-off-by: Yap Zhi Heng <yapzhhg@gmail.com>
philberty
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #3530
make check-rustpasses locallyclang-formatgcc/testsuite/rust/This quick fix is kind of an ugly one, since parsing of
reprtypes is not fully implemented yet. This merely adds a newReprKindtype similar to Rust'sReprFlags.I'm open to suggestions for improvements, or any tips on fully implementing the parsing
reprtypes properly.