start top level decls - also oops forgot about sizeless arrays

This commit is contained in:
pommicket 2022-01-28 15:07:23 -05:00
parent 01b8a4d728
commit 217794afce
5 changed files with 173 additions and 25 deletions

View file

@ -7,22 +7,33 @@
/* R,S,T */
/* } *Foo[sizeof(unsigned long)]; */
/* typedef int A[T]; */
/* */
/* typedef struct A { */
/* int x, y; */
/* long double c; */
/* unsigned long d; */
/* char e[3]; */
/* long f; */
/* } A; */
/* */
/* typedef union B{ */
/* int x; */
/* struct { */
/* int y; */
/* struct {long z; } c; */
/* } c; */
/* }B; */
/* */
/* typedef int x[sizeof(A)+sizeof"hello"]; */
/* typedef int y[sizeof(struct B)]; */
typedef struct A {
int x, y;
long double c;
unsigned long d;
char e[3];
long f;
} A;
static unsigned int x;
static unsigned int y;
static unsigned int z[1000];
static unsigned int w;
typedef union B{
int x;
struct {
int y;
struct {long z; } c;
} c;
}B;
typedef int x[sizeof(A)+sizeof"hello"];
typedef int y[sizeof(struct B)];
/*
NOTE: THIS MUST WORK
int x[] = {1,2,3}
sizeof x
*/