From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52330 invoked by alias); 18 Apr 2018 18:06:41 -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 52302 invoked by uid 89); 18 Apr 2018 18:06:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Apr 2018 18:06:39 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2D4785D5E6; Wed, 18 Apr 2018 18:06:38 +0000 (UTC) Received: from theo.uglyboxes.com (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E6C045D6B7; Wed, 18 Apr 2018 18:06:37 +0000 (UTC) Subject: Re: [RFA 3/4] Remove TYPE_TAG_NAME To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20180417195125.14200-1-tom@tromey.com> <20180417195125.14200-4-tom@tromey.com> <072a09ed-40a3-4e15-2a67-54ac58d1f82a@redhat.com> <8736zs9z3o.fsf@tromey.com> From: Keith Seitz Message-ID: <24661375-32f5-d6a2-aed6-e9c7d7c91433@redhat.com> Date: Wed, 18 Apr 2018 18:06:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <8736zs9z3o.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-04/txt/msg00375.txt.bz2 On 04/18/2018 10:57 AM, Tom Tromey wrote: >>>>>> "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. Seeing "language_minimal" caught me off guard. A comment would more than satisfy me. > >>> 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. I agree. My rhetorical "question" was really more a statement of disbelief. Things like this seem to catch me by surprise every so often -- sometimes more often than not. Keith