#include <stdio.h> #include <wchar.h> #include <string.h> int main(void) { char32_t* str = L"日本語"; int i; } return 0; }
Standard input is empty
prog.c: In function 'main':
prog.c:6:2: error: unknown type name 'char32_t'
char32_t* str = L"日本語";
^
prog.c:6:18: warning: initialization from incompatible pointer type
char32_t* str = L"日本語";
^
prog.c:8:25: warning: passing argument 1 of 'wcslen' from incompatible pointer type
for (i = 0; i < wcslen(str); i++) {
^
In file included from prog.c:2:0:
/usr/include/wchar.h:287:15: note: expected 'const wchar_t *' but argument is of type 'int *'
extern size_t wcslen (const wchar_t *__s) __THROW __attribute_pure__;
^
Standard output is empty