https://issues.dlang.org/show_bug.cgi?id=24132
Adam Wilson <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|ImportC: Add support for |ImportC: Add support for |wchar_t |wchar_t, char16_t, char32_t --- Comment #2 from Adam Wilson <[email protected]> --- (In reply to ryuukk_ from comment #1) > Sounds like an easy PR to do, add the define here: > > https://github.com/dlang/dmd/blob/master/druntime/src/importc.h It's not *quite* that simple. wchar_t is #define as an unsigned short in C, and either an unsigned short *or* an intrinsic type in C++. This means that when the preprocessor runs it emits an unsigned short. However, most C preprocessors have a switch that treat wchar_t as an intrinsic type instead of "typedef wchar_t unsigned short" However, the current ImportC implementation does not support this and vomits up errors when you try to use it. What we need is the ability for ImportC to recognize wchar_t, char16_t, and char32_t *after* the preprocessor has run so that ImportC can emit the appropriate char/wchar/dchar types. --
