------- Comment #2 from falk at debian dot org 2005-10-03 20:48 ------- (In reply to comment #0)
> The offset of "p5" member is 25 bytes, but compiler thinks that "p5" is > aligned > in "foo" function You are casting a pointer to a Foo* that doesn't have proper alignment for a Foo. This is undefined behavior, so anything can happen, including an unaligned access at some later point. This is not a gcc bug. > It might be not very good coding practice, but it taken from Mozilla source. Please report it there instead. -- falk at debian dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |falk at debian dot org Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24178