This is the mail archive of the
mailing list for the GCC project.
SRUTHY C.N. wrote:
why this alignment to multiple of 16?
This is an incomplete bug report. It is important to give testcases,
compiler options, compiler versions, etc.
It is probably an accident of implementation. You can use __alignof()
to get the structure alignment, and see that it is only 4. However, we
need to align the stack in the function main to 16-bytes because 16-byte
alignment gives better code, and not all systems have startup code that
give a 16-byte aligned stack. So if your testcase defines the structure
in main, it might appear to have 16-byte alignment but it really
doesn't. Define the structure in a function with any other name, and
you will see differently. This probably would have been obvious if you
had bothered to include a testcase.
Is RTL representation dependent on GCC version?
The format changes infrequently. The contents change frequently, since
they depend on gcc features and optimizations which change all of the time.
gcc-2.96 to gcc-3.2 is really a very long time in terms of gcc
development, because of how rapidly gcc changes. You can't expect
things to be the same between those two versions.
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com