Integrate more chibicc changes
This commit is contained in:
4
third_party/chibicc/test/hog_test.c
vendored
4
third_party/chibicc/test/hog_test.c
vendored
@@ -1,4 +0,0 @@
|
||||
main(void) {
|
||||
void *p;
|
||||
p = "hello";
|
||||
}
|
||||
9
third_party/chibicc/test/initializer_test.c
vendored
9
third_party/chibicc/test/initializer_test.c
vendored
@@ -445,6 +445,15 @@ int main() {
|
||||
};
|
||||
x.a;
|
||||
}));
|
||||
ASSERT(1, ({
|
||||
union {
|
||||
int a;
|
||||
char b;
|
||||
} x = {
|
||||
1,
|
||||
};
|
||||
x.a;
|
||||
}));
|
||||
ASSERT(2, ({
|
||||
enum {
|
||||
x,
|
||||
|
||||
18
third_party/chibicc/test/struct_test.c
vendored
18
third_party/chibicc/test/struct_test.c
vendored
@@ -392,6 +392,24 @@ int main() {
|
||||
} x = {1}, y = {2};
|
||||
(0 ? x : y).a;
|
||||
}));
|
||||
ASSERT(2, ({
|
||||
struct {
|
||||
int a;
|
||||
} x = {1}, y = {2};
|
||||
(x = y).a;
|
||||
}));
|
||||
ASSERT(1, ({
|
||||
struct {
|
||||
int a;
|
||||
} x = {1}, y = {2};
|
||||
(1 ? x : y).a;
|
||||
}));
|
||||
ASSERT(2, ({
|
||||
struct {
|
||||
int a;
|
||||
} x = {1}, y = {2};
|
||||
(0 ? x : y).a;
|
||||
}));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user