[Issue 22161] New: importC: Support parsing C asm expressions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jul 30 14:04:30 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=22161

          Issue ID: 22161
           Summary: importC: Support parsing C asm expressions
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: ibuclaw at gdcproject.org

The CParser only supports parsing DMD-style or GDC-style inline assembly.  Both
of which are not related to GCC.

E.g: This fails.
---
void asmtest()
{
  asm("");
}
---

But this (weirdly) works:
---
void asmtest()
{
  asm @safe { nop; }
}
---

... and with the gdc compiler, the D language equivalent would also compile:
---
void asmtest()
{
  asm { ""; }
}
---

--


More information about the Digitalmars-d-bugs mailing list