Recognize the #[cfi_encoding] attribute and warn that it does nothing - #4846
Merged
Merged
Conversation
Create a new enum class to indicate whether a feature was gated or not to the FeatureGate checker. As well as moving `gate` into a public function since the aim is to make it available to other passes. gcc/rust/ChangeLog: * checks/errors/feature/rust-feature-gate.cc (FeatureGate::gate): Move into public methods, use GateResult enum. * checks/errors/feature/rust-feature-gate.h: Add new GateResult enum.
And warn that it currently does not do anything, and depends on a patchset upstream that is currently being reviewed. gcc/rust/ChangeLog: * checks/errors/feature/rust-feature-defs-rfl.h: Add cfi_encoding RfL feature. * checks/errors/feature/rust-feature-gate.cc (FeatureGate::visit): Add visitor for attributes in general, and warn on cfi_encoding being used. * checks/errors/feature/rust-feature-gate.h: Declare the attribute visitor. * util/rust-attribute-values.h: Add #[cfi_encoding]. * util/rust-attributes.cc: Likewise. gcc/testsuite/ChangeLog: * rust/compile/cfi-encoding1.rs: New test. * rust/compile/cfi-encoding2.rs: New test.
Member
|
i dont think this is merged in yet: "https://gcc.gnu.org/pipermail/gcc-patches/2026-July/724091.html" but i bet all this is will be to add another atribute onto the record type |
Member
Author
|
@philberty yes exactly, I actually reached out to the patch author (@kees) to make sure I understood everything correctly, and you're right that we'll need to add another attribute to override this. For now Kees' patchset does not allow overriding the encoding but this is something we'll eventually work on together! |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.