Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

how to disable structure alignment using gcc compiler options ?

0
Posted

how to disable structure alignment using gcc compiler options ?

0

Hi All, How can I disable structure alignment feature of gcc using command-line options ? I recently migrated to 64-bit OS, and doubt that I might be experiencing a structure alignment problem due to the new 64-bit architecture. I checked the sizes of the same C-style struct in both x86 and x86_64, and found out that they appear to be different by 20 bytes. I am not sure if this is due to structure alignment or the differences in data type lengths between two platforms. Hence, I will first disable the structure alignment feature, and then check the struct sizes again. Thanks.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123