From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 86218 invoked by alias); 16 Jan 2018 20:36:26 -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 85501 invoked by uid 89); 16 Jan 2018 20:36:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no 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; Tue, 16 Jan 2018 20:36:23 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CE0FD87627; Tue, 16 Jan 2018 20:36:22 +0000 (UTC) Received: from localhost (unused-10-15-17-193.yyz.redhat.com [10.15.17.193]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 992F26BF69; Tue, 16 Jan 2018 20:36:22 +0000 (UTC) From: Sergio Durigan Junior To: Eli Zaretskii Cc: gdb-patches@sourceware.org Subject: Re: [ANNOUNCEMENT] GDB 8.1 release branch created! References: <83h8rlyakm.fsf@gnu.org> <87po69zkxe.fsf@redhat.com> Date: Tue, 16 Jan 2018 20:36:00 -0000 In-Reply-To: <87po69zkxe.fsf@redhat.com> (Sergio Durigan Junior's message of "Tue, 16 Jan 2018 14:02:37 -0500") Message-ID: <87po69y20p.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00321.txt.bz2 On Tuesday, January 16 2018, I wrote: >> g++ -x c++ -O2 -gdwarf-4 -g3 -I. -I. -I./common -I./config -DLOCALEDIR="\"d:/usr/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode -I./../opcodes/.. -I./../readline/.. -I../bfd -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber -I./gnulib/import -Ibuild-gnulib/import -DTUI=1 -Id:/usr/include -Id:/usr/include/guile/2.0 -Id:/usr/include -Id:/usr/Python26/include -Id:/usr/Python26/include -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized -Wno-format -c -o infrun.o -MT infrun.o -MMD -MP -MF ./.deps/infrun.Tpo infrun.c >> In file included from infrun.c:26:0: >> inferior.h: In function 'void handle_vfork_child_exec_or_exit(int)': >> inferior.h:537:39: warning: '*((void*)(& maybe_restore_inferior)+20).scoped_restore_current_inferior::m_saved_inf' may be used uninitialized in this function [-Wmaybe-uninitialized] >> { set_current_inferior (m_saved_inf); } >> ^ >> infrun.c:927:6: note: '*((void*)(& maybe_restore_inferior)+20).scoped_restore_current_inferior::m_saved_inf' was declared here >> maybe_restore_inferior; >> ^~~~~~~~~~~~~~~~~~~~~~ >> In file included from inferior.h:48:0, >> from infrun.c:26: >> progspace.h:285:47: warning: '*((void*)(& maybe_restore_inferior)+16).scoped_restore_current_program_space::m_saved_pspace' may be used uninitialized in this function [-Wmaybe-uninitialized] >> { set_current_program_space (m_saved_pspace); } >> ^ >> infrun.c:927:6: note: '*((void*)(& maybe_restore_inferior)+16).scoped_restore_current_program_space::m_saved_pspace' was declared here >> maybe_restore_inferior; >> ^~~~~~~~~~~~~~~~~~~~~~ I'm not sure why this one is happening. I think it has something to do with the fact that we're declaring "maybe_restore_inferior" as gdb::optional, because scoped_restore_current_inferior's constructor already takes care of initializing "m_saved_inf" (same goes for scoped_restore_current_program_space). If that is the case, then maybe we can mark the "uninitialized variable" warning for "m_saved_inf" and "m_saved_pspace". WDYT? -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/