Colin Finck ha scritto:
For Linux and FreeBSD, this includes the "stddef.h" header, which is also responsible for defining wchar_t on these hosts.
So this is a MinGW bug, where not hosts are created equal. Isn't it? wchar_t must not depend on the host. wchar_t is not the happy-fun ISO C generic type, nice and kind and asexual. wchar_t under MinGW must be the hairy Win32 bubba, two bytes unsigned. The happy-fun ISO C wchar_t will get beaten to the ground and mugged. It has no business in my <stddef.h>
It sounds like, in fact, we are using target headers in host code
True.
ò___ò
WHY and WHERE
Since we share the code for some libraries for host and target components, we consequently mix target headers and host code.
"Consequently"? I hope that's "accidentally". When host tools and libraries are compiled under Windows, they must be compiled as Windows code. When they are compiled under Linux, as Linux code. And so on. No exceptions. NO. EXCEPTIONS. We have been having these idiotic issues for YEARS, but the difference between host and target is pretty simple. Host is host and target is target. You will never fix
What host modules include target headers?