次の例では、U を付加した二重引用符で囲んだ文字列リテラルを示します。また、-xustr を指定するコマンド行も示します。
example% cat file.cc const unsigned short *foo = U"foo"; const unsigned short bar[] = U"bar"; const unsigned short *fun() {return foo;} example% CC -xustr=ascii_utf16_ushort file.cc -c |
8 ビットの文字列リテラルに U を付加して、unsigned short 型を持つ 16 ビットの UTF-16 文字を形成できます。次に例を示します。
const unsigned short x = U'x'; const unsigned short y = U'\x79'; |