www.digitalmars.com         C & C++   DMDScript  

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


          Issue ID: 21944

           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