This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, rfc] Semantics of attribute (aligned), misscompilation of crtstuff
Zdenek Dvorak <rakdver@kam.mff.cuni.cz> writes:
> as discussed in http://gcc.gnu.org/ml/gcc-patches/2007-10/msg00771.html,
> aligned(sizeof(func_ptr)) on variables specifies only that the alignment
> must be at least that of sizeof(func_ptr), so crtstuff should not
> rely on that the alignment of such a variable is not increased above
> this bound.
You can get exact alignment with the packed attribute.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."