From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id fP/7J0fYEmWDdR0AWB0awg (envelope-from ) for ; Tue, 26 Sep 2023 09:10:31 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=XAtmNkEy; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 99B761E0C3; Tue, 26 Sep 2023 09:10:31 -0400 (EDT) Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 8B3441E092 for ; Tue, 26 Sep 2023 09:10:29 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E9469385C6EA for ; Tue, 26 Sep 2023 13:10:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E9469385C6EA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1695733828; bh=Shb16AIOudj0mHWqe1z/l2sTtFmPpl2icrDvvkPjKEI=; h=To:Cc:Subject:References:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=XAtmNkEy76ejb2Rae/dJpt+sQhv0ig7KJM/K09jj1nrtIb5VddoPCqw9XvU1s5FNg QSboa5EpzQrEpoFClkqM3M5s67LRmT3xwxy02rkiEdREWvSgJht65xcaMNhCloWSWd 6XinnHm0eNjwjKpIajjswkrcOtH2rAkGG8XqyNN0= Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by sourceware.org (Postfix) with ESMTPS id 9ED7A3858D35 for ; Tue, 26 Sep 2023 13:10:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9ED7A3858D35 Received: by mail-io1-xd2c.google.com with SMTP id ca18e2360f4ac-79545e141c7so239741539f.0 for ; Tue, 26 Sep 2023 06:10:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695733807; x=1696338607; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Shb16AIOudj0mHWqe1z/l2sTtFmPpl2icrDvvkPjKEI=; b=EHfcV0djD8qIotJvJJKUrfJ/mNvUspkeZJrcJ1NKDJTlNTcGQPji+27RbOjzoHF3F3 YYkuVAbwsCYwEjokGd71+ISzbLbs6dOE25cyRKr9bLbsTjcaR2Du9Y44b6cPxsa1SLIc AARigKryVqjh5fJFHn6eQKuY/1FhcEone/rgfrS0FHWeK2OoyqNHtucTWeuuis1ng+L/ /XceINLFg1JB8c2MEHlH6zGtCOA24jYcgNPOo+IG7J1GkKLM0Lg71UfiHEl25vd6nrEi onZ20zJbCNq+uDbryyiFi/MWDnXKt9azVXzFyUsjhZJKo6u6PnNDIW832XsR62JQi3O6 Cfrg== X-Gm-Message-State: AOJu0YyfQBI9VPqGvYBF1jKLvWpjYQzilWlG2/c1JngZTtcXSQTNzNxf 5nDkeckCTfHeeDL0+tnBZhSrB6cKhlLTyfEyzQfs4g== X-Google-Smtp-Source: AGHT+IEzuFkca6dMEJdRVT41lQNV8WGmGVfly5s65TLTgVBkbqQkSgFCsNI8qu4VUWjAkuyV5m5sww== X-Received: by 2002:a05:6602:2e08:b0:783:727a:8e15 with SMTP id o8-20020a0566022e0800b00783727a8e15mr3314298iow.6.1695733807348; Tue, 26 Sep 2023 06:10:07 -0700 (PDT) Received: from murgatroyd (71-211-130-31.hlrn.qwest.net. [71.211.130.31]) by smtp.gmail.com with ESMTPSA id c4-20020a5ea804000000b00786fd8e764bsm3289974ioa.0.2023.09.26.06.10.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 06:10:06 -0700 (PDT) To: Lancelot SIX Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH 1/7] Use .def file to stringify type codes References: <20230921-field-bits-v1-0-201285360900@adacore.com> <20230921-field-bits-v1-1-201285360900@adacore.com> <20230925215810.jhxq35iznktykrzl@octopus> X-Attribution: Tom Date: Tue, 26 Sep 2023 07:10:06 -0600 In-Reply-To: <20230925215810.jhxq35iznktykrzl@octopus> (Lancelot SIX's message of "Mon, 25 Sep 2023 22:58:10 +0100") Message-ID: <87jzsd5bdd.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, 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.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Tom Tromey via Gdb-patches Reply-To: Tom Tromey Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" >>>>> "Lancelot" == Lancelot SIX writes: >> + default: >> + return "UNKNOWN TYPE CODE"; Lancelot> Is this default "just" to make the compiler happy? I don't expect it Lancelot> should ever executed. If so, I usually prefer the following construct: It's just to avoid any semantic change. I doubt it can happen -- it certainly isn't supposed to happen. Lancelot> The return after the switch block avoids the "control reaches end of Lancelot> non-void function" error, but since there is no "default:" the compiler Lancelot> can warn if some enumerator is not covered by the switch. I'll do it. Tom