1// RUN: %clang_cc1 -verify -std=c++98 %s 2 3char c00 = '\u0000'; // expected-error {{universal character name refers to a control character}} 4char c01 = '\u0001'; // expected-error {{universal character name refers to a control character}} 5char c1f = '\u001f'; // expected-error {{universal character name refers to a control character}} 6char c20 = '\u0020'; // ' ', expected-error {{character ' ' cannot be specified by a universal character name}} 7char c22 = '\u0022'; // ", expected-error {{character '"' cannot be specified by a universal character name}} 8char c23 = '\u0023'; // #, expected-error {{character '#' cannot be specified by a universal character name}} 9char c24 = '\u0024'; // $, ok 10char c25 = '\u0025'; // %, expected-error {{character '%' cannot be specified by a universal character name}} 11char c27 = '\u0027'; // ', expected-error {{character ''' cannot be specified by a universal character name}} 12char c3f = '\u003f'; // ?, expected-error {{character '?' cannot be specified by a universal character name}} 13char c40 = '\u0040'; // @, ok 14char c41 = '\u0041'; // A, expected-error {{character 'A' cannot be specified by a universal character name}} 15char c5f = '\u005f'; // _, expected-error {{character '_' cannot be specified by a universal character name}} 16char c60 = '\u0060'; // `, ok 17char c7e = '\u007e'; // ~, expected-error {{character '~' cannot be specified by a universal character name}} 18char c7f = '\u007f'; // expected-error {{universal character name refers to a control character}} 19 20wchar_t w007f = L'\u007f'; // expected-error {{universal character name refers to a control character}} 21wchar_t w0080 = L'\u0080'; // expected-error {{universal character name refers to a control character}} 22wchar_t w009f = L'\u009f'; // expected-error {{universal character name refers to a control character}} 23wchar_t w00a0 = L'\u00a0'; 24 25wchar_t wd799 = L'\ud799'; 26wchar_t wd800 = L'\ud800'; // expected-error {{invalid universal character}} 27wchar_t wdfff = L'\udfff'; // expected-error {{invalid universal character}} 28wchar_t we000 = L'\ue000'; 29 30const char *s00 = "\u0000"; // expected-error {{universal character name refers to a control character}} 31const char *s01 = "\u0001"; // expected-error {{universal character name refers to a control character}} 32const char *s1f = "\u001f"; // expected-error {{universal character name refers to a control character}} 33const char *s20 = "\u0020"; // ' ', expected-error {{character ' ' cannot be specified by a universal character name}} 34const char *s22 = "\u0022"; // ", expected-error {{character '"' cannot be specified by a universal character name}} 35const char *s23 = "\u0023"; // #, expected-error {{character '#' cannot be specified by a universal character name}} 36const char *s24 = "\u0024"; // $, ok 37const char *s25 = "\u0025"; // %, expected-error {{character '%' cannot be specified by a universal character name}} 38const char *s27 = "\u0027"; // ', expected-error {{character ''' cannot be specified by a universal character name}} 39const char *s3f = "\u003f"; // ?, expected-error {{character '?' cannot be specified by a universal character name}} 40const char *s40 = "\u0040"; // @, ok 41const char *s41 = "\u0041"; // A, expected-error {{character 'A' cannot be specified by a universal character name}} 42const char *s5f = "\u005f"; // _, expected-error {{character '_' cannot be specified by a universal character name}} 43const char *s60 = "\u0060"; // `, ok 44const char *s7e = "\u007e"; // ~, expected-error {{character '~' cannot be specified by a universal character name}} 45const char *s7f = "\u007f"; // expected-error {{universal character name refers to a control character}} 46 47const wchar_t *ws007f = L"\u007f"; // expected-error {{universal character name refers to a control character}} 48const wchar_t *ws0080 = L"\u0080"; // expected-error {{universal character name refers to a control character}} 49const wchar_t *ws009f = L"\u009f"; // expected-error {{universal character name refers to a control character}} 50const wchar_t *ws00a0 = L"\u00a0"; 51 52const wchar_t *wsd799 = L"\ud799"; 53const wchar_t *wsd800 = L"\ud800"; // expected-error {{invalid universal character}} 54const wchar_t *wsdfff = L"\udfff"; // expected-error {{invalid universal character}} 55const wchar_t *wse000 = L"\ue000"; 56