#include <iostream>
#include <cstddef>
using namespace std;
#pragma pack(1)
struct STestPragmaPack {
char c;
long d;
} datasPP;
#pragma pack()
struct STestAttributPacked {
char c;
long d;
} __attribute__((packed)) datasAP;
struct STestAlignas {
char c;
alignas(char) long d;
} datasA;
int main() {
cout << "pragma pack = " << sizeof(datasPP) << endl;
cout << "attribute packed = " << sizeof(datasAP) << endl;
cout << "alignas = " << sizeof(STestAlignas) << endl;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y3N0ZGRlZj4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCiNwcmFnbWEgcGFjaygxKQpzdHJ1Y3QgU1Rlc3RQcmFnbWFQYWNrIHsKICBjaGFyIGM7CiAgbG9uZyBkOwp9IGRhdGFzUFA7CiNwcmFnbWEgcGFjaygpCgpzdHJ1Y3QgU1Rlc3RBdHRyaWJ1dFBhY2tlZCB7CiAgY2hhciBjOwogIGxvbmcgZDsKfSBfX2F0dHJpYnV0ZV9fKChwYWNrZWQpKSBkYXRhc0FQOwoKc3RydWN0IFNUZXN0QWxpZ25hcyB7CiAgY2hhciBjOwogIGFsaWduYXMoY2hhcikgbG9uZyBkOwp9IGRhdGFzQTsKCmludCBtYWluKCkgewoJY291dCA8PCAicHJhZ21hIHBhY2sgPSAiIDw8IHNpemVvZihkYXRhc1BQKSA8PCBlbmRsOwoJY291dCA8PCAiYXR0cmlidXRlIHBhY2tlZCA9ICIgPDwgc2l6ZW9mKGRhdGFzQVApIDw8IGVuZGw7Cgljb3V0IDw8ICJhbGlnbmFzID0gIiA8PCBzaXplb2YoU1Rlc3RBbGlnbmFzKSA8PCBlbmRsOwp9