[Bug libstdc++/92143] std::pmr::polymorphic_allocator<char> throws bad_alloc on macOS
gcc-bugzilla at daryl dot haresign.com
gcc-bugzilla@gcc.gnu.org
Sun Oct 20 16:57:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92143
--- Comment #8 from Daryl Haresign <gcc-bugzilla at daryl dot haresign.com> ---
(In reply to Jonathan Wakely from comment #5)
> C11 6.2.8 says "Valid alignments
> include only those values returned by an _Alignof expression for fundamental
> types, plus an additional implementation-defined set of values, which may be
> empty. Every valid alignment shall be a nonnegative integral power of two."
>
> _Alignof(char) and _Alignof(short) and _Alignof(int) are valid alignments
> supported by the implementation, and so aligned_alloc is wrong to reject
> them.
Read together I agree it does sound that way.
(In reply to Jonathan Wakely from comment #7)
> Fixed on trunk so far, but I'll backport it too.
Great, thanks!
More information about the Gcc-bugs
mailing list