www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21944] New: importC: Support parsing # line marker directive

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

          Issue ID: 21944

                    extensions
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ibuclaw gdcproject.org

The gcc preprocessor (gcc -E) spits out code like this:
---







---

The CParser seems to successfully ignore these directives, though it does so
using the `panic()` function.

However if a line marker appears in the middle of a declaration, e.g:
---
struct Foo {
  int var;

};
---

An error occurs.

--
May 21 2021