<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>22 feb 2010 kl. 20.37 skrev Charles Davis:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>This patch fixes __alignof__ to behave the same as GCC when a reference<br>to a field of a struct is the operand. This fixes PR6362.<br><br>GCC returns the lesser of the alignment of the type of the field or the<br>packed alignment of the struct in this situation. Right now, clang just<br>returns the alignment of the type, no matter what. This means that the<br>behavior of clang deviates from GCC when a field of a packed struct<br>(i.e. one with the 'packed' attribute or one declared after a pack<br>pragma) is the operand.<br><br>Software in the wild (e.g., Wine) already depends on this behavior.<br><br>This is a simple patch, but I wanted to run it past you guys before<br>committing.<br><br></div></blockquote></div><br><div>Hi Charles,</div><div><br></div><div>patch looks good. I assume all tests pass? :)</div><div><br></div><div><blockquote type="cite"><div><font class="Apple-style-span" color="#000000">+      // In the case of a field in a packed struct, we want the MINIMUM</font></div></blockquote><div><br></div><div>No need to shout here :), plz change to "minimum".</div><div><br></div><div>Anders</div></div></body></html>