From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20100 invoked by alias); 18 Apr 2018 17:57:36 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 19986 invoked by uid 89); 18 Apr 2018 17:57:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1422, haha, investigated X-HELO: gateway22.websitewelcome.com Received: from gateway22.websitewelcome.com (HELO gateway22.websitewelcome.com) (192.185.47.168) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Apr 2018 17:57:34 +0000 Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway22.websitewelcome.com (Postfix) with ESMTP id C92CE2898 for ; Wed, 18 Apr 2018 12:57:32 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id 8rKmfZaPGy2aL8rKmfwcNZ; Wed, 18 Apr 2018 12:57:32 -0500 X-Authority-Reason: nr=8 Received: from 97-122-176-117.hlrn.qwest.net ([97.122.176.117]:38066 helo=pokyo) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1f8rKm-004BEI-Db; Wed, 18 Apr 2018 12:57:32 -0500 From: Tom Tromey To: Keith Seitz Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [RFA 3/4] Remove TYPE_TAG_NAME References: <20180417195125.14200-1-tom@tromey.com> <20180417195125.14200-4-tom@tromey.com> <072a09ed-40a3-4e15-2a67-54ac58d1f82a@redhat.com> Date: Wed, 18 Apr 2018 17:57:00 -0000 In-Reply-To: <072a09ed-40a3-4e15-2a67-54ac58d1f82a@redhat.com> (Keith Seitz's message of "Wed, 18 Apr 2018 09:57:55 -0700") Message-ID: <8736zs9z3o.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BWhitelist: no X-Source-L: No X-Exim-ID: 1f8rKm-004BEI-Db X-Source-Sender: 97-122-176-117.hlrn.qwest.net (pokyo) [97.122.176.117]:38066 X-Source-Auth: tom+tromey.com X-Email-Count: 3 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-SW-Source: 2018-04/txt/msg00374.txt.bz2 >>>>> "Keith" == Keith Seitz writes: >> + /* If we have "typedef struct foo {. . .} bar;" do we want to >> + print it as "struct foo" or as "bar"? Pick the latter for >> + C++, because C++ folk tend to expect things like "class5 >> + *foo" rather than "struct class5 *foo". */ >> + if (language == language_c || language == language_minimal) Keith> I'm almost afraid to ask, but why was language_minimal necessary here? Keith> A small comment might be appropriate? Keith> [I think I can already guess the heinous reason...] Do you know if Keith> there is a test case that specifically covers this block with Keith> language_minimal? I think in this case, I added language_minimal on the theory that it is "C-like". I don't think there's a test case. I can add a comment, and a test case wouldn't be too hard either. Keith> Good riddance! I never did understand the "except by poorly Keith> designed C++ code" comment. Haha, me neither. I always considered it a critique of some other code elsewhere in gdb (perhaps long since removed) but who knows. >> gdb_test "ptype \$structreg" \ >> "type = struct struct1 {\r\n *v4int8 v4;\r\n *v2int16 v2;\r\n}" Keith> Was the tag name never printed until now? Wow! Maybe I should have investigated this one more deeply? I dunno. The change seemed to make sense to me so I just moved on. Tom