If you compile C code that uses size_t, you'll get the error message:
Error: undefined identifier `size_t`
It would help to add something to that error message telling the user they need #include <stddef.h> in the C file. This is slightly confusing because size_t is built into D, so it's kind of surprising when DMD says it doesn't know what size_t is.
Comment #1 by alphaglosined — 2024-03-05T20:15:59Z
This should also apply to ptrdiff_t.
Comment #2 by lance — 2024-03-09T14:02:53Z
Same for NULL. The error message is incorrect: Error: undefined identifier `NULL`, did you mean `null`? But if you change it to null, you get Error: undefined identifier `null`.
Maybe stddef.h should always be included with C code. There's not much in there, but what's there is used frequently.
Comment #3 by robert.schadek — 2024-12-13T19:33:45Z