[Issue 24069] New: ImportC does not parse function pointer as parameter without name

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 5 06:43:55 UTC 2023


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

          Issue ID: 24069
           Summary: ImportC does not parse function pointer as parameter
                    without name
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: alphaglosined at gmail.com

>From QBE-1.1 all.h:

```c
void parse(FILE *, char *, void (Dat *), void (Fn *));
```

Fails to parse with:

```
P:\test_qbe_importc\source\../qbe-1.1/all.h(504,38): Error: found `*` when
expecting `)`
P:\test_qbe_importc\source\../qbe-1.1/all.h(504,42): Error: identifier or `(`
expected
```

Adding the name for the parameters works.

```
void parse(FILE *, char *, void data(Dat *), void func(Fn *));
```

--


More information about the Digitalmars-d-bugs mailing list