This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/67999] Wrong optimization of pointer comparisons
- From: "danielmicay at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 16 Feb 2018 03:22:10 +0000
- Subject: [Bug c/67999] Wrong optimization of pointer comparisons
- Auto-submitted: auto-generated
- References: <bug-67999-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67999
--- Comment #28 from Daniel Micay <danielmicay at gmail dot com> ---
I got jemalloc / Bionic libc (Android) to report errors for malloc and
mmap/mremap larger than PTRDIFF_MAX a while ago (along with fixing a missing
case for mremap in musl), but glibc needs to be convinced to do the same. It
would be a lot easier to convince them with this officially documented. I think
it's perfectly reasonable if it's clearly stated that objects larger than
PTRDIFF_MAX are not supported and that the libc implementation needs to deal
with it.