-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
asm!: options should work multiple times, to simplify macros #73193
Copy link
Copy link
Closed
Labels
A-inline-assemblyArea: Inline assembly (`asm!(…)`)Area: Inline assembly (`asm!(…)`)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.F-asm`#![feature(asm)]` (not `llvm_asm`)`#![feature(asm)]` (not `llvm_asm`)T-langRelevant to the language teamRelevant to the language team
Metadata
Metadata
Assignees
Labels
A-inline-assemblyArea: Inline assembly (`asm!(…)`)Area: Inline assembly (`asm!(…)`)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.F-asm`#![feature(asm)]` (not `llvm_asm`)`#![feature(asm)]` (not `llvm_asm`)T-langRelevant to the language teamRelevant to the language team
Type
Fields
Give feedbackNo fields configured for issues without a type.
To simplify the implementation of macros wrapping
asm!, I thinkoptionsshould work if specified multiple times, with the semantic that no conflicting options may be provided. (We could also do "last option wins", but I think I'd slightly prefer "don't specify conflicting options" instead.)This would, for instance, make it much easier to implement an
asm_att!macro that passes all its arguments toasm!and addsoptions(att_syntax), without having to scan all the tokens it receives, look for an existingoptions, and append to it if found.Sample code that I think should work (printing
9):