RFA (libstdc++): PATCH to implement C++17 over-aligned new
Jonathan Wakely
jwakely@redhat.com
Fri Sep 16 18:09:00 GMT 2016
On 16/09/16 13:12 +0100, Jonathan Wakely wrote:
>On 16/09/16 11:56 +0100, Jonathan Wakely wrote:
>>On 16/09/16 11:37 +0200, Marc Glisse wrote:
>>>Is the division (by a non-constant denominator) really necessary?
>>
>>Probably not, but I've asked the committee for clarification what this
>>function should do when called with an invalid alignment.
>>
>>>Since align has to be a power of 2, x % align should be the same
>>>as x & (align - 1), for instance.
>>
>>Thanks, if it's UB to call it with alignments that aren't a power of
>>two then we can do that.
>
>I've committed the patch now, to fix the failures for Solaris. I'll
>revisit it when I get clarification from the committee about invalid
>alignment arguments.
I missed 18.6.2/1 which is clear that we don't have to support invalid
alignments passed to operator new, so I'm committing this.
Tested x86_64-linux.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 932 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20160916/e24f441a/attachment.bin>
More information about the Libstdc++
mailing list