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

          Issue ID: 23023
           Summary: ImportC: useless casts are erroneously forbidden
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

The following is valid C:
```
long f1(void) { return 0; }
void f2(void) { (int)f1(); }
```
but ImportC rejects it with "`cast(int)f1()` has no effect"

Such code often appears in macro expansions.

--

Reply via email to