Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

Commit

Permalink
sizeof bugfix: type size align
Browse files Browse the repository at this point in the history
  • Loading branch information
xushiwei committed Aug 8, 2022
1 parent d855291 commit d6a5770
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions testdata/flow/flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,21 @@ struct foo {
double b;
};

struct ff {
char* file;
int line;
int r;
float x;
float x2;
float y;
float dy;
int e;
};

int main() {
int a = __builtin_offsetof(struct foo, b);
int *b = &a;
printf("sizeof(ff) = %d\n", (int)sizeof(struct ff));
switch (a) {
case 4:
printf("Hi\n");
Expand Down

0 comments on commit d6a5770

Please sign in to comment.