mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-14 15:09:09 +00:00
Integrate more chibicc changes
This commit is contained in:
parent
2ed7956be4
commit
15280753e2
13 changed files with 293 additions and 182 deletions
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue