HELLO·Android
系统源代码
IT资讯
技术文章
我的收藏
注册
登录
-
我收藏的文章
创建代码块
我的代码块
我的账号
Android 10
|
10.0.0_r6
下载
查看原文件
收藏
根目录
external
clang
test
Lexer
string-literal-encoding.c
// RUN: %clang_cc1 -x c++ -std=c++0x -fsyntax-only -verify %s // This file should be encoded using ISO-8859-1, the string literals should // contain the ISO-8859-1 encoding for the code points U+00C0 U+00E9 U+00EE // U+00F5 U+00FC void f() { wchar_t const *a = L""; // expected-error {{illegal character encoding in string literal}} char16_t const *b = u""; // expected-error {{illegal character encoding in string literal}} char32_t const *c = U""; // expected-error {{illegal character encoding in string literal}} wchar_t const *d = LR"()"; // expected-error {{illegal character encoding in string literal}} char16_t const *e = uR"()"; // expected-error {{illegal character encoding in string literal}} char32_t const *f = UR"()"; // expected-error {{illegal character encoding in string literal}} char const *g = ""; // expected-warning {{illegal character encoding in string literal}} char const *h = u8""; // expected-error {{illegal character encoding in string literal}} char const *i = R"()"; // expected-warning {{illegal character encoding in string literal}} } void g() { wchar_t const *a = L"foo "; // expected-error {{illegal character encoding in string literal}} char16_t const *b = u"foo "; // expected-error {{illegal character encoding in string literal}} char32_t const *c = U"foo "; // expected-error {{illegal character encoding in string literal}} wchar_t const *d = LR"(foo )"; // expected-error {{illegal character encoding in string literal}} char16_t const *e = uR"(foo )"; // expected-error {{illegal character encoding in string literal}} char32_t const *f = UR"(foo )"; // expected-error {{illegal character encoding in string literal}} char const *g = "foo "; // expected-warning {{illegal character encoding in string literal}} char const *h = u8"foo "; // expected-error {{illegal character encoding in string literal}} char const *i = R"(foo )"; // expected-warning {{illegal character encoding in string literal}} }
C++程序
|
34行
|
2.07 KB
原始内容
高亮显示
复制内容
×
已收藏
收藏成功,您可以在我收藏的代码页面中查看,其地址为:
https://www.androidos.net.cn/my/collect/code
。
登录后可以享受更多权益
您还没有登录,登录后您可以:
收藏Android系统代码
收藏喜欢的文章
多个平台共享账号
去登录
首次使用?从这里
注册