wchar.c 448 B

123456789101112
  1. // RUN: %clang_cc1 -fsyntax-only -fshort-wchar -verify %s
  2. void f() {
  3. (void)L"\U00010000"; // unicode escape produces UTF-16 sequence, so no warning
  4. (void)L'\U00010000'; // expected-error {{character too large for enclosing character literal type}}
  5. (void)L'ab'; // expected-warning {{extraneous characters in character constant ignored}}
  6. (void)L'a\u1000'; // expected-warning {{extraneous characters in character constant ignored}}
  7. }