<br><br>On Monday, December 8, 2014, Joerg Sonnenberger <<a href="mailto:joerg@britannica.bec.de">joerg@britannica.bec.de</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, Dec 08, 2014 at 02:03:28AM -0800, David Majnemer wrote:<br>
> Nick, consider:<br>
><br>
> char a[0];<br>
> char b[0];<br>
><br>
> at run-time:<br>
> (gdb) p &a<br>
> $1 = (char (*)[]) 0x60103c<br>
> (gdb) p &b<br>
> $2 = (char (*)[]) 0x60103c<br>
><br>
> Even if this is not safe at the C or C++ level, this comparison could<br>
> return equal or not equal depending on what the linker chooses to do.<br>
<br>
It is invalid C as is the original code. If you want to play such linker<br>
games, mark one of the objects involved as weak.</blockquote><div><br></div><div>Right, but nothing forbids this comparison at the IR level.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Joerg<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="javascript:;" onclick="_e(event, 'cvml', 'LLVMdev@cs.uiuc.edu')">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote>