Bug 20593 – [GCC ASM] Parser syntax for asm operands differs from GCC
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-02-22T10:55:56Z
Last change time
2020-03-14T17:48:29Z
Keywords
pull
Assigned to
Iain Buclaw
Creator
Iain Buclaw
Comments
Comment #0 by ibuclaw — 2020-02-22T10:55:56Z
This is permitted in D.
asm { "cpuid" : "=a" a; }
But the documented syntax in gcc says that the expression/variable should be around parentheses (https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#InputOperands)
The old (incorrect) syntax should be deprecated in favour of:
asm { "cpuid" : "=a" (a); }
Comment #1 by dlang-bot — 2020-02-22T21:23:09Z
@ibuclaw created dlang/dmd pull request #10820 "fix Issue 20593 - Parser syntax for asm operands differs from GCC" fixing this issue:
- fix Issue 20593 - Parser syntax for asm operands differs from GCC
https://github.com/dlang/dmd/pull/10820
Comment #2 by dlang-bot — 2020-03-10T04:10:08Z
dlang/dmd pull request #10820 "fix Issue 20593 - Parser syntax for asm operands differs from GCC" was merged into master:
- 1ca04a8f6c976793804c536bca8a3c15486d5dff by Iain Buclaw:
fix Issue 20593 - Parser syntax for asm operands differs from GCC
https://github.com/dlang/dmd/pull/10820
Comment #3 by dlang-bot — 2020-03-14T17:48:29Z
dlang/dmd pull request #10916 "[dmd-cxx] Check in iasmgcc.c implementation" was merged into dmd-cxx:
- 73ad46093e2dbcfa922120553ee431449c88eb00 by Iain Buclaw:
fix Issue 20593 - Parser syntax for asm operands differs from GCC
https://github.com/dlang/dmd/pull/10916