Created
September 17, 2023 07:36
-
-
Save manishym/0f1be3d95db928c8e2b3fc8fea86b7d3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdint.h> | |
struct foo | |
{ | |
char b; | |
__int128_t bar; | |
char baz; | |
__int128_t barz; | |
char barzz; | |
}; | |
struct var4_aligned | |
{ | |
char a; | |
int b; | |
char c; | |
}; | |
struct var8_aligned | |
{ | |
char a; | |
int64_t b; | |
char c; | |
}; | |
struct var16_aligned | |
{ | |
char a; | |
__int128_t b; | |
char c; | |
}; | |
struct var16_aligned_member80 | |
{ | |
char a; | |
struct foo b; | |
char c; | |
}; | |
struct var | |
{ | |
char a; | |
volatile struct foo b; | |
char c; | |
}; | |
int main() | |
{ | |
printf("Size of var: %ld, foo: %ld\n", sizeof(struct var), sizeof(struct foo)); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment