From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by sourceware.org (Postfix) with ESMTPS id 1A3A03858C55 for ; Thu, 29 Sep 2022 20:03:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1A3A03858C55 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f45.google.com with SMTP id m4so3799994wrr.5 for ; Thu, 29 Sep 2022 13:03:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject :x-gm-message-state:from:to:cc:subject:date; bh=JV4HuzDbQVWg2x54OS7YeHCkF08xH3N0F/W5kTFn2sc=; b=bh/yNNpVdQ+Dn6ffAPPBDtmQJVilEOrsbXkHvJy0sSHt9i73KWglmsE2uX2u52BMWR 8Z6e3V0f91Bs9F4Nj0IzSaLcy9lN0XAqaxRoRbR/U6M1SULJS+Vv1rT7WUXW+56s5+lx xo2Fkrh3WLRr3qMCcgHf5iTE6NFlQBIK0zTgUyAqI/4jf/tZJzImj/uMFsDkuzfr8g1v K7tJNxUkFxV2sy+5GZ40yYGglJl38G/R9ftSBgwkXpRpK4hO8dLny6i06F74lGKCuD5m uyMcUpXpshZ0E1e8Xs2FC80JdHTFyq89zC95Q6A0ubCgHfyvvlTPCh/GUwJXniebiAaG PHRg== X-Gm-Message-State: ACrzQf0JaifDltGp7WZD9hzHXMwNnfNhVw1A8o+qTCWRJkH3GQ9m2D6A 8V5ytDobRuNflwbd1AzgoSGnRAShlYCJnw== X-Google-Smtp-Source: AMsMyM7iBIkfpyKknJ54lw2liTQenObWgjYpVeOlHiRFqxvbpzowOv9mS/p8dUM+hT7m3VbOddIjag== X-Received: by 2002:a5d:568e:0:b0:22c:c58c:85a3 with SMTP id f14-20020a5d568e000000b0022cc58c85a3mr3811113wrv.39.1664481820653; Thu, 29 Sep 2022 13:03:40 -0700 (PDT) Received: from ?IPv6:2001:8a0:f93a:3b00:e038:5cdc:b8bf:4653? ([2001:8a0:f93a:3b00:e038:5cdc:b8bf:4653]) by smtp.gmail.com with ESMTPSA id t187-20020a1c46c4000000b003b4a699ce8esm5244032wma.6.2022.09.29.13.03.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Sep 2022 13:03:39 -0700 (PDT) Subject: Re: [PATCH][gdb/c++] Print destructor the same for gcc and clang To: Keith Seitz , Tom de Vries , gdb-patches@sourceware.org References: <20220927103546.GA27362@delia.home> <9992b2dc-60f4-539a-1727-1dc9546b2bc2@redhat.com> From: Pedro Alves Message-ID: Date: Thu, 29 Sep 2022 21:03:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <9992b2dc-60f4-539a-1727-1dc9546b2bc2@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2022 20:03:47 -0000 On 2022-09-29 6:52 p.m., Keith Seitz via Gdb-patches wrote: > This all looks okay; thank you for that cleanup. Consistency is welcome. > +1 > On the [off-]topic of "void" vs ""... The standard (IIUC) permits the use of > "void" in destructors. If I create a class with a private dtor, e.g., to elicit > a compilation failure, clang++ never outputs the symbol name. GCC, on the other > hand, does, and it outputs "" (no "void", even if I explicitly use "void" in the > dtor). > > While I would prefer "", I don't have a compelling argument either way. [It's > trivial to implement with your patch.] I would prefer "" too. It just looks weird/redundant for C++, IMHO. > > I recommend you approve your patch. :-) Thanks Keith. That certainly helps!