What does the following statement actually do and what are it’s effects?
#pragma pack(push,8)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It pushes the current
packsetting onto a stack (so that you can restore it later viapop) and then sets the alignment for struct elements to 8 bytes. Anything which is not naturally aligned to an 8 byte boundary will have padding bytes inserted before it to maintain the required alignment.