[Issue 22342] importC: Error: function 'func()' is not callable using argument types '(int)'

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Oct 3 17:13:35 UTC 2021


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

--- Comment #2 from Iain Buclaw <ibuclaw at gdcproject.org> ---
Side effects cannot be discarded either:
---
int printf(const char *, ...);

int foo()
{
  printf("A\n");
  return 0;
}

int bar()
{
  printf("B\n");
  return 0;
}

int main()
{
  int v;
  return bar(1, &v, foo(), "str", bar());
}
---

Compiles without any warnings, and outputs:
---
B
A
B

--


More information about the Digitalmars-d-bugs mailing list