Skip to content

asm! should catch attempts to use .intel_syntax or .att_syntax and suggest appropriate options instead #79869

New issue

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

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

Already on GitHub? # to your account

Closed
joshtriplett opened this issue Dec 9, 2020 · 3 comments · Fixed by #82270
Assignees
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-inline-assembly Area: Inline assembly (`asm!(…)`) C-enhancement Category: An issue proposing an enhancement or a PR with one. F-asm `#![feature(asm)]` (not `llvm_asm`) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@joshtriplett
Copy link
Member

joshtriplett commented Dec 9, 2020

People used to gcc/clang inline assembly may try using the .intel_syntax or .att_syntax directives directly in the assembly string, which can cause issues. Ideally, we should detect attempts to use those directives. Attempting to use .intel_syntax should generate an error stating that that's the default. Attempting to use .att_syntax should generate an error and point to the att_syntax option, ideally with a rustfix-applicable suggestion.

@joshtriplett joshtriplett added A-diagnostics Area: Messages for errors, warnings, and lints A-inline-assembly Area: Inline assembly (`asm!(…)`) F-asm `#![feature(asm)]` (not `llvm_asm`) labels Dec 9, 2020
@camelid camelid added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 9, 2020
@asquared31415
Copy link
Contributor

Is anyone currently working on this? I would like to do it if not.

@joshtriplett
Copy link
Member Author

@asquared31415 Not to my knowledge, no.

@asquared31415
Copy link
Contributor

@rustbot claim

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-inline-assembly Area: Inline assembly (`asm!(…)`) C-enhancement Category: An issue proposing an enhancement or a PR with one. F-asm `#![feature(asm)]` (not `llvm_asm`) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants