Wide character test problem

On Windows, the type of wide characters is unsigned short, causing the Sema/wchar.c to fail, which assumes int type.

The easiest fix seems to be to conditionalize it, as follows:

Index: test/Sema/wchar.c

Hello, John

On Windows, the type of wide characters is unsigned short, causing the
Sema/wchar.c to fail, which assumes int type.
The easiest fix seems to be to conditionalize it, as follows:

1. What's about mingw?
2. It's better to conditionalize based on -fshort-wchar option

Anton,

  1. What’s about mingw?

MinGW inherits the _WIN32 define.

  1. It’s better to conditionalize based on -fshort-wchar option

I’m not sure what you mean by the -fshort-wchar option. There doesn’t seem to be such an option. Or do you mean to add one? Or is there an implicit define I might use in a conditional?

Alternatively, because this is a platform assumption, we could just delete the offending line.

-John

Hello, John

2. It's better to conditionalize based on -fshort-wchar option

I'm not sure what you mean by the -fshort-wchar option. There doesn't seem
to be such an option. Or do you mean to add one?

If it does not exist - then yes, gcc uses this option to control the
sizeof(wchar_t).

Then I will look into implementing it.

Thanks, Anton.

-John