<div dir="ltr">I've come across this issue before and came to the following conclusion:<div>- We are not obligated to support objects that large, C11 <a href="http://5.2.4.1/1">5.2.4.1/1</a> only requires that we support objects of size 65535!  Their guidance for maximum object size is stated to be half of SIZE_MAX in C11 K.3.4/4 which is typically equivalent to PTRDIFF_MAX.</div><div>- The expectation that PTRDIFF_MAX is more or less a proxy for the largest object size is not uncommon.  For example, C++'s std::count doesn't return a size_t but a iterator_traits<>::difference_type which is going to be a ptrdiff_t for things like std::vector.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 20, 2016 at 1:31 AM, John Regehr via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It could be that 32-bit systems are disappearing so rapidly that nobody cares too much about this issue, but this blog post is still worth reading:<br>
<br>
  <a href="http://trust-in-soft.com/objects-larger-than-ptrdiff_max-bytes/" rel="noreferrer" target="_blank">http://trust-in-soft.com/objects-larger-than-ptrdiff_max-bytes/</a><br>
<br>
John<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div><br></div>