Integrate more chibicc changes

This commit is contained in:
Justine Tunney 2020-12-09 13:53:02 -08:00
parent 2ed7956be4
commit 15280753e2
13 changed files with 293 additions and 182 deletions

View file

@ -1,4 +0,0 @@
main(void) {
void *p;
p = "hello";
}

View file

@ -445,6 +445,15 @@ int main() {
};
x.a;
}));
ASSERT(1, ({
union {
int a;
char b;
} x = {
1,
};
x.a;
}));
ASSERT(2, ({
enum {
x,

View file

@ -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;
}