<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 12, 2018 at 5:23 PM, Shiva Chen via Phabricator <span dir="ltr"><<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">shiva0217 added a comment.<br>
<span class=""><br>
In <a href="https://reviews.llvm.org/D45510#1066136" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D45510#1066136</a>, @dberlin wrote:<br>
<br>
> This C case is actually not legal (it's been discussed before many times).<br>
>  You cannot take the address of .a field, add an offset, and get to another field legally.<br>
>  So i wouldn't express it in these terms, since in that language, this is clearly illegal.<br>
><br>
> The LLVM version, of course, does not make this undefined behavior AFAIK (which is a source of much imprecision)<br>
<br>
<br>
</span>Hi @dberlin. Thanks for the comments. So it's a language restriction which is illegal! Would you mind point me out which rule in C99 mention this restriction or the threads relative to this topic we could follow?<br></blockquote><div><br></div><div>It's covered extensively gcc bugzilla (searches for struct and aliasing will find various bugs and lead you back to various discussions), cerebus, and elsewhere.</div><div><br></div><div>I don't have trivial links for you.</div><div><br></div></div></div></div>