mirror of
https://github.com/intel/llvm.git
synced 2026-01-25 19:44:38 +08:00
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:
@@ -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.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user