On Wed, Sep 14, 2016 at 10:28 AM, Jonathan Wakely <jwak...@redhat.com> wrote: > On 14/09/16 09:09 -0700, Cong Wang wrote: >> >> On Wed, Sep 14, 2016 at 4:06 AM, Jonathan Wakely <jwak...@redhat.com> >> wrote: >>> >>> If I understand the purpose of the change correctly, it's similar to >>> https://gcc.gnu.org/ml/gcc-patches/2014-06/msg00278.html - is that >>> right? >>> >> >> Oh, yes, I didn't know your patch because I don't subscribe >> gcc mailing list. I am wondering why your patch is not merged >> after 2+ years? > > > As I said in the patch email, I'm not sure if it's conforming, due to > clearing the string's cpacity() as well as its size(). >
OK. My patch keeps the original logic except the case for _GLIBCXX_FULLY_DYNAMIC_STRING, should be at least as correct as the current code. ;) >> Please let me know what you prefer: 1) You update your patch >> and get it merged; 2) Use my patch if it looks good. I am fine with >> either way. :) > > > I'll refresh my memory of the various issues and reconsider applying > my patch (that way we don't need to wait for your copyright > assignment). The performance benefits you measured make it more > compelling. Sure. For long term, I think gcc should have something as simple as 'Signed-off-by' for Linux kernel, otherwise too much work for first-time contributors like me. We all want to save time on this, don't we? ;) Thanks.