forked from OSchip/llvm-project
fix PR7192 by defining wchar_t in a more conventional way. The
type of L"x" can change based on command line arguments. llvm-svn: 113127
This commit is contained in:
parent
2ba828f36d
commit
ee8df8f167
|
@ -34,7 +34,7 @@ typedef __typeof__(sizeof(int)) size_t;
|
|||
#ifndef __cplusplus
|
||||
#ifndef _WCHAR_T
|
||||
#define _WCHAR_T
|
||||
typedef __typeof__(*L"") wchar_t;
|
||||
typedef __WCHAR_TYPE__ wchar_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -2,3 +2,9 @@
|
|||
|
||||
// PR4804
|
||||
char* x = "foo"; // expected-warning {{initializing 'char *' with an expression of type 'const char [4]' discards qualifiers}}
|
||||
|
||||
// PR7192
|
||||
#include <stddef.h>
|
||||
void test(wchar_t *dst) {
|
||||
dst[0] = 0; // Ok.
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue