ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newstringwith_gc
Last change
on this file since 91b216b4 was
51b7345,
checked in by Peter A. Buhr <pabuhr@…>, 10 years ago
|
initial commit
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | int main() { |
---|
2 | // character constants |
---|
3 | |
---|
4 | ' '; |
---|
5 | 'a'; |
---|
6 | '"'; |
---|
7 | '_'; |
---|
8 | |
---|
9 | '\a'; // simple escape |
---|
10 | '\b'; |
---|
11 | '\e'; // GCC |
---|
12 | '\f'; |
---|
13 | '\n'; |
---|
14 | '\r'; |
---|
15 | '\t'; |
---|
16 | '\v'; |
---|
17 | '\''; |
---|
18 | '\"'; //" |
---|
19 | '\?'; |
---|
20 | '\\'; |
---|
21 | |
---|
22 | '\0'; // octal escape |
---|
23 | '\377'; |
---|
24 | |
---|
25 | '\xf'; // hex escape |
---|
26 | '\xff'; |
---|
27 | |
---|
28 | // warnings/errors |
---|
29 | |
---|
30 | ''; // empty character |
---|
31 | 'aa'; // multi-character |
---|
32 | 'a\na'; // multi-character, embedded escape |
---|
33 | 'a\0a'; |
---|
34 | '\xfff'; // hex escape out of range |
---|
35 | '_\377_'; // multi-character |
---|
36 | '_\xff_'; |
---|
37 | '\xffff'; // hex escape out of range |
---|
38 | 'a\xff34w'; |
---|
39 | '\xf_f'; // multi-character |
---|
40 | '\xff_ff'; |
---|
41 | |
---|
42 | // string constants |
---|
43 | |
---|
44 | " "; |
---|
45 | "a"; |
---|
46 | "'"; |
---|
47 | '_'; |
---|
48 | |
---|
49 | "\a"; // simple escape |
---|
50 | "\b"; |
---|
51 | "\e"; // GCC |
---|
52 | "\f"; |
---|
53 | "\n"; |
---|
54 | "\r"; |
---|
55 | "\t"; |
---|
56 | "\v"; |
---|
57 | "\'"; |
---|
58 | "\""; |
---|
59 | "\?"; |
---|
60 | "\\"; |
---|
61 | |
---|
62 | "\0"; // octal escape |
---|
63 | "\377"; |
---|
64 | |
---|
65 | "\xf"; // hex escape |
---|
66 | "\xff"; |
---|
67 | |
---|
68 | ""; |
---|
69 | "aa"; |
---|
70 | "a\na"; |
---|
71 | "a\0a"; |
---|
72 | "_\377_"; |
---|
73 | "_\xff_"; |
---|
74 | "\xf_f"; |
---|
75 | "\xff_ff"; |
---|
76 | |
---|
77 | // warnings/errors |
---|
78 | |
---|
79 | "\xfff"; // hex escape out of range |
---|
80 | "a\xff34w"; |
---|
81 | "\xffff"; |
---|
82 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.