Consider the following code:

```
#include <assert.h>
#include <fcntl.h>
#include <io.h>
#include <stdio.h>

int main (void) {
  _setmode (_fileno (stderr), _O_U8TEXT);
  assert (0);
  return 0;
}
```

When compiled with MSVC, it properly prints message about failed assertion. 
When it is compiled with mingw-w64's headers (Msys2/UCRT64) it produces no 
output.

mingw-w64's assert.h maps assert() macro to _wassert only when _UNICODE or 
UNICODE is defined. MSVC's assert.h always maps assert() macro to _wassert and 
even no longer exposes _assert function.

How about we always map assert() macro to _wassert for msvcr80.dll and later? 
Since we also emulate _wassert for msvcrt.dll, it should be OK to map it to 
_wassert for msvcrt.dll as well.

- Kirill Makurin

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to