From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 73718 invoked by alias); 19 Jun 2018 18:47: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 73695 invoked by uid 89); 19 Jun 2018 18:47: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,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: gateway36.websitewelcome.com Received: from gateway36.websitewelcome.com (HELO gateway36.websitewelcome.com) (192.185.197.22) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 19 Jun 2018 18:47:39 +0000 Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway36.websitewelcome.com (Postfix) with ESMTP id A42FD400E2CBC for ; Tue, 19 Jun 2018 13:47:36 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id VLf4foTIkPvAdVLfAfyyFw; Tue, 19 Jun 2018 13:47:36 -0500 X-Authority-Reason: nr=8 Received: from 75-166-79-120.hlrn.qwest.net ([75.166.79.120]:55018 helo=pokyo) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fVLf4-001iyd-Km; Tue, 19 Jun 2018 13:47:26 -0500 From: Tom Tromey To: Pedro Alves Cc: Sergio Durigan Junior , GDB Patches Subject: Re: [PATCH] Silence GCC "uninitialized" warning on minsyms.c:lookup_minimal_symbol_by_pc_section References: <20180325191943.8246-12-palves@redhat.com> <20180618202634.10452-1-sergiodj@redhat.com> <73d51f47-0f68-178f-3a5d-e842a2fa240b@redhat.com> Date: Tue, 19 Jun 2018 18:47:00 -0000 In-Reply-To: <73d51f47-0f68-178f-3a5d-e842a2fa240b@redhat.com> (Pedro Alves's message of "Tue, 19 Jun 2018 16:21:58 +0100") Message-ID: <87efh2pq9u.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BWhitelist: no X-Source-L: No X-Exim-ID: 1fVLf4-001iyd-Km X-Source-Sender: 75-166-79-120.hlrn.qwest.net (pokyo) [75.166.79.120]:55018 X-Source-Auth: tom+tromey.com X-Email-Count: 3 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-SW-Source: 2018-06/txt/msg00485.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Pedro> The simplest is to add a "default:" case with a gdb_assert, but Pedro> when I wrote that code, I had not done that on purpose, Pedro> thinking that I'd prefer it if we enabled "-Wswitch" in gdb, which Pedro> helps find switch/cases where we need to handle a new enumerator, Pedro> whenever we add one, like this: I looked at adding -Wswitch or -Wswitch-enum once. All I really remember is thinking that there were cases where gdb would not want this. However, I think maybe it can be done on a case-by-case basis with "#pragma GCC diagnostic push". Tom