Is there any difference between attribute((packed,aligned(n))) and
attribute((aligned(n))) ?
Is there any difference between attribute ((packed,aligned(n))) and attribute ((aligned(n))) ?
Share
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.
The
alignedattribute specifies the minimum alignment the variable/field must have. Thepackedattribute requests that the variable/field should have the smallest possible alignment. So just using__attribute__((aligned(n))sets the minimum alignment ton, but does not guarantee that it won’t be larger. But using__attribute__((packed,aligned(n)))sets the alignment to preciselyn.