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

Commit

Permalink
Merge pull request #147 from xushiwei/q
Browse files Browse the repository at this point in the history
sizeof bugfix: type size align
  • Loading branch information
xushiwei authored Aug 8, 2022
2 parents f907296 + 7f38023 commit bb55fe2
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 bb55fe2

Please sign in to comment.