lang_c/
strings.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
pub const RESERVED_C11: &'static [&'static str] = &[
    "auto",
    "break",
    "case",
    "char",
    "const",
    "continue",
    "default",
    "do",
    "double",
    "else",
    "enum",
    "extern",
    "float",
    "for",
    "goto",
    "if",
    "inline",
    "int",
    "long",
    "register",
    "restrict",
    "return",
    "short",
    "signed",
    "sizeof",
    "static",
    "struct",
    "switch",
    "typedef",
    "union",
    "unsigned",
    "void",
    "volatile",
    "while",
    "_Alignas",
    "_Alignof",
    "_Atomic",
    "_Bool",
    "_Complex",
    "_Generic",
    "_Imaginary",
    "_Noreturn",
    "_Static_assert",
    "_Thread_local",
    "_Float16",
    "_Float16x",
    "_Float32",
    "_Float32x",
    "_Float64",
    "_Float64x",
    "_Float128",
    "_Float128x",
    "_Decimal32",
    "_Decimal32x",
    "_Decimal64",
    "_Decimal64x",
    "_Decimal128",
    "_Decimal128x",
];

pub const RESERVED_GNU: &'static [&'static str] = &[
    "__FUNCTION__",
    "__PRETTY_FUNCTION__",
    "__alignof",
    "__alignof__",
    "__asm",
    "__asm__",
    "__attribute",
    "__attribute__",
    "__builtin_offsetof",
    "__builtin_va_arg",
    "__complex",
    "__complex__",
    "__const",
    "__extension__",
    "__func__",
    "__imag",
    "__imag__",
    "__inline",
    "__inline__",
    "__label__",
    "__null",
    "__real",
    "__real__",
    "__restrict",
    "__restrict__",
    "__signed",
    "__signed__",
    "__thread",
    "__typeof",
    "__volatile",
    "__volatile__",
];

// Ref: https://clang.llvm.org/docs/AttributeReference.html
pub const RESERVED_CLANG: &'static [&'static str] = &[
    // Only enabled with -fms-extensions and only affect *-*-win32 targets
    "__single_inheritance",
    "__multiple_inheritance",
    "__virtual_inheritance",
    "__unspecified_inheritance",
    // Calling conventions
    "__fastcall",
    "__regcall",
    "__stdcall",
    "__thiscall",
    "__vectorcall",
    // Nullability attributes
    "_Nonnull",
    "_Null_unspecified",
    "_Nullable",
];