www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22904] New: importC: syntax error for function call with

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

          Issue ID: 22904
           Summary: importC: syntax error for function call with casted
                    result and parentheses around name
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: ImportC, rejects-valid
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: duser neet.fi

int fn1() { return 0; }
void fn2() { long x = (long) (fn1) (); }

Error: expression expected, not `long`

similar to issue 22876 but the PR to fix that doesn't seem to affect this

--
Mar 19 2022