From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) by sourceware.org (Postfix) with ESMTPS id E8C3A388A42A for ; Mon, 2 Nov 2020 17:20:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E8C3A388A42A Received: by mail-io1-xd41.google.com with SMTP id s10so1408894ioe.1 for ; Mon, 02 Nov 2020 09:20:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=odsTsU1o+4OG4QOgaP5kmD+IB7DSLfrNTUevi58ZuFE=; b=jEeb3M7f1gdPXSEEuI5sMrZiY4Gt8yZ7UKjaZxp+U2Ttc5MqKCMV9CBaysgd2tGZLv 1psQTrU1aBAdQDyrP1Mxw90vE+C6z14oCSDNtMSLvg72A7/dHJ6DS1zOjguWgf7S0CFU 2uBLb854mO+Knj2uMA28J7QG3eXRQKC3w0zKd/P0x1VskUlnj1/KjN0dTEPsQvynkJln Om9R5QmgGW6PrESxtlX/F9JSg6X1bsu3CpUqK8DFbxBmmjbS1klEX6BgwRv0ZG8QblDZ W7j2BkLI65/q5eobNistUgsd+OR9L3iPlE4SE7SAZvgscRhFyjg4JWV1lPxgDhUfxhIA Wsmg== X-Gm-Message-State: AOAM530uMBVGvqXbbRiIz6euaD7IXP2JSQg3sVnar1fVmuCLr/UdgwUu Eliwz49rDns1yFVOejZjxdMCe3T+eIhLkV1Ir/M= X-Google-Smtp-Source: ABdhPJxQt7yteesCptf6nDXlqFh6ZFVMv/0j4hm+lHyaTutVFdvfIYoYmwG8Xojso73GvRzfgjaCCJnQCfslJl/Jvt8= X-Received: by 2002:a6b:f808:: with SMTP id o8mr11124239ioh.136.1604337644370; Mon, 02 Nov 2020 09:20:44 -0800 (PST) MIME-Version: 1.0 References: <83f496cc-58ee-419a-d2ae-02005a2ab398@redhat.com> <46e6b452-a3af-bab4-52e7-c700da8d5d54@redhat.com> In-Reply-To: <46e6b452-a3af-bab4-52e7-c700da8d5d54@redhat.com> From: kamlesh kumar Date: Mon, 2 Nov 2020 22:50:08 +0530 Message-ID: Subject: Re: [PATCH] c++: Implement DR2303 [PR97453] To: Jason Merrill Cc: gcc-patches List , Marek Polacek Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_ASCII_DIVIDERS, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2020 17:20:46 -0000 >>Do you see a reason this wouldn't work? No, I do not see any.This is good. >>so it's probably simplest to go ahead with mine. Yes, thank you. On Mon, Nov 2, 2020 at 9:48 PM Jason Merrill wrote: > > On 11/2/20 10:10 AM, kamlesh kumar wrote: > > addressed jason comments. > > no regression due to this, tested on x86_64 linux. > > > > On Tue, Oct 27, 2020 at 11:09 PM Jason Merrill wrote: > >> > >> On 10/22/20 1:31 PM, kamlesh kumar wrote: > >>> Attaching the patch file. > >>> > >>> >>Instead of building a hash table, would it work to handle ambiguity by > >>> >>checking whether one of the classes is a base of the other? > >> > >>> Fixing for cases like: struct B: A,A may not be cleaner > >>> this way. > >> > >> Why not? Your patch does extra work even when there's no ambiguity. > >> > >>> On Thu, Oct 22, 2020 at 3:23 AM Jason Merrill >>> > wrote: > >>> > > >>> > On 10/21/20 6:32 AM, kamlesh kumar wrote: > >>> > > gcc/cp/ChangeLog > >>> > > ----------------------------------- > >>> > > > >>> > > 2020-10-21 Kamlesh Kumar >>> > > >>> > > > >>> > > PR c++/97453 > >>> > > * pt.c (get_template_base): Implement DR2303, > >>> > > Consider closest base while template > >>> > > deduction when base of base also matches. > >>> > > > >>> > > gcc/testsuite/ChangeLog > >>> > > ------------------------------------------ > >>> > > > >>> > > 2020-10-21 Kamlesh Kumar >>> > > >>> > > > >>> > > * g++.dg/Drs/dr2303.C: New Test > >>> > > > >>> > > -------------------------------------------------- > >>> > > > >>> > > As part of this patch I Implemented fix for below defect report in cwg > >>> > > https://wg21.cmeerw.net/cwg/issue2303 . > >>> > > >>> > Thanks! > >>> > > >>> > Please see https://gcc.gnu.org/contribute.html for guidance on email > >>> > subject lines; for this patch I'd think something like > >>> > > >>> > [PATCH] c++: Implement DR2303 [PR97453] > >>> > > >>> > Also, your patch was corrupted by word wrap; the easiest way to avoid > >>> > that is probably to attach the file rather than copy it into the message. > >>> > > >>> > > Reg tested on x86_64 and did not found any failure. > >>> > > Patch summary: Remove base of base from list of bases > >>> > > > >>> > > created a hash_set from list of bases and then iterate over each > >>> > > element of hash_set and find its list of bases and remove this from > >>> > > hash_set if present. > >>> > > and finally, deduction succeeds if in hash_set remains only single > >>> > > element or it's empty. > >>> > > otherwise deduction is ambiguous. > >>> > > >>> > Instead of building a hash table, would it work to handle ambiguity by > >>> > checking whether one of the classes is a base of the other? > > This is what I had in mind; it seems clearer to me. Do you see a reason > this wouldn't work? > > Also, I notice that you still don't seem to have a copyright assignment > on file with the FSF. I and Jonathan Wakely both asked about it last > year; has there been any progress on that? Your patch is too large to > go in without a copyright assignment, so it's probably simplest to go > ahead with mine. > > Thanks, > Jason