[Bug libstdc++/87544] alloc-size-larger-than incorrectly triggered

glisse at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Oct 9 11:38:00 GMT 2018


--- Comment #10 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #9)
> Do we want something like this as well? (and for malloc_allocator too)

I think so. Changing allocator_traits as LWG seems likely to agree won't help
much until we remove the deprecated std::allocator::max_size, but since I doubt
we will do that soon, we should update the allocators.

> I added the preprocessor condition because I'm not sure if we can always
> assume that ptrdiff_t and size_t are the same width.

I don't think we can.

More information about the Gcc-bugs mailing list