From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x332.google.com (mail-ot1-x332.google.com [IPv6:2607:f8b0:4864:20::332]) by sourceware.org (Postfix) with ESMTPS id 72C3F388A43A for ; Mon, 4 Jan 2021 18:53:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 72C3F388A43A Received: by mail-ot1-x332.google.com with SMTP id j20so27002593otq.5 for ; Mon, 04 Jan 2021 10:53:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=4RwO7Bc2mYNqScU46fmIVHvhdWQBBFKXhtS8eRjr7z8=; b=aWdcpGVHqPvaBGgNFpX7OaZAN3byGVbXwsMHc3fOt28tk0niXyGcdpL4B8yZNpFwhL X9ROtqsN4ZW2OoB2FcaPUEjnND2YVn45tzIuDkQs8U0wc2Ga2/Sgj2QK8W1Wym52UlsX AotPGO07qzK1zh3m5Au7iUv86e1YtEBk7gqUyYlMt/n79NBCiL3U9/5sfXuJd10bffQb LsL6uYmmEqpix3TvRCNrlJosPw2xK/PPc9EN8LS9E5VCtMM+E73gPvsHBsTYqsNP4cBP I2qgKXAAyGVI0eGus8nH6GkhLhtEa7OX+DOVwr0QmiyyRamngdb/cH6VwhE/95Ka5WKX jB6A== X-Gm-Message-State: AOAM532HAw8w9FxH2YlNZ583Y3N3y3Fp2YOcW0ytY5dTtcC9+P8Ca17N /NgJYUCp26fojjQUAg04KvWYVLVqT8o= X-Google-Smtp-Source: ABdhPJxuffENz5aOYXKm0SU/sy+kE+G1RCREmZ/z4qRy9a8mp6QB3l1/KMvWrPnpjMsip3t5TrfoeA== X-Received: by 2002:a05:6830:1210:: with SMTP id r16mr53852902otp.343.1609786435612; Mon, 04 Jan 2021 10:53:55 -0800 (PST) Received: from [192.168.0.41] (75-166-96-128.hlrn.qwest.net. [75.166.96.128]) by smtp.gmail.com with ESMTPSA id f14sm13470257oib.40.2021.01.04.10.53.54 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Jan 2021 10:53:55 -0800 (PST) Subject: [PING][PATCH] correct -Wmismatched-new-delete for template instantiations (PR 98305) From: Martin Sebor To: gcc-patches References: <6bd181ad-20ad-0d23-d6a2-120dfdb33971@gmail.com> Message-ID: Date: Mon, 4 Jan 2021 11:53:54 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <6bd181ad-20ad-0d23-d6a2-120dfdb33971@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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, 04 Jan 2021 18:53:58 -0000 Ping: https://gcc.gnu.org/pipermail/gcc-patches/2020-December/562141.html On 12/16/20 7:10 PM, Martin Sebor wrote: > The -Wmismatched-new-delete detection of operator members of class > template instantiations is incomplete and overly simplistic, leading > to incorrect results and false positives.  Rather than reinventing > the wheel and parsing the mangled qualified names of the operators > the attached patch uses the demangler to compare their names.  Since > the code is only entered rarely (for user- defined overloads of > the operators, the cost of the demangling should be negligible in > most code bases). > > Tested on x86_64-linux. > > Martin