From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-io1-xd2c.google.com with SMTP id ca18e2360f4ac-79545e141c7so239741539f.0 for ; Tue, 26 Sep 2023 06:10:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1695733807; x=1696338607; darn=sourceware.org; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=Shb16AIOudj0mHWqe1z/l2sTtFmPpl2icrDvvkPjKEI=; b=HqBSwGsLK6flUXUbQOn23zQ14h717MK109SxQICJi7H/O+6rMUGIt4k1qi5u2OnlPR JWTWp/C9WNTRC9tbVW/q/zbyxKDkACNpZzoTJIir6rq11Yd31WvgoUDNrG7TwwSijCmB +SA/reVbkCTKPgINq8FWppwRr8TaZKTgHvgppj3EmzIsu83VH1Cb6lzvX6PQYqbZ9FVe DGRdf0hdSaQ4+ostQ/JtAHZ2y84qLDZ5qOpVGvjbbd6U/wmjfQRYs/FcPr+qAGIOwr+w m2GErCPEnoBZ3Dcl3Ppa4aIz96zuGtsqHHrRNHOJxvoLpkPfAELKqXksjEHVZ6EklgS1 44Sg== 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) From: Tom Tromey 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 List-Id: >>>>> "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