g++.dg/ext/packed3.C
Nathan Sidwell
nathan@codesourcery.com
Wed Dec 7 18:07:00 GMT 2005
Jan Beulich wrote:
>
> Why? It's broken. You just cannot embed something that requires
> alignment into something that doesn't guarantee alignment, except that
> for built-in types, the compiler can synthesize the necessary splitting,
> but Foo's assignment operator, in your example, may be totally unaware
> that it might get called with an unaligned object.
People write such code and expect it to work.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
More information about the Gcc
mailing list