From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2686 invoked by alias); 19 Dec 2012 20:09:44 -0000 Received: (qmail 2668 invoked by uid 22791); 19 Dec 2012 20:09:42 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.fgznet.ch (HELO smtp.fgznet.ch) (81.92.96.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 19 Dec 2012 20:09:35 +0000 Received: from deuterium.andreas.nets (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id qBJK9QNU091528; Wed, 19 Dec 2012 21:09:29 +0100 (CET) (envelope-from andreast-list@fgznet.ch) Message-ID: <50D21EF6.5000704@fgznet.ch> Date: Wed, 19 Dec 2012 20:09:00 -0000 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: Tom Tromey CC: gdb-patches@sourceware.org Subject: Re: [patch] make older gcc happy mips-tdep.c References: <50D1FF7F.7060303@fgznet.ch> <87ip7xontk.fsf@fleche.redhat.com> In-Reply-To: <87ip7xontk.fsf@fleche.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2012-12/txt/msg00718.txt.bz2 Hi Tom! On 19.12.12 20:15, Tom Tromey wrote: >>>>>> "Andreas" == Andreas Tobler writes: > > Andreas> 2012-12-19 Andreas Tobler > > Andreas> * mips-tdep.c (mips_deal_with_atomic_sequence): Initialize > Andreas> branch_bp to keep gcc happy. > > This is ok, but I'm pretty surprised that the problem is here and not in > micromips_deal_with_atomic_sequence. The latter looks more like the > kind of usage that would provoke warnings from gcc. Your surprise is correct! I did something wrong. I have wrongly applied the patch from my git repo to the cvs repo. A rebuild with the cvs repo showed that you are absolutely correct. Thank you very much. I'll commit the below if ok. Andreas 2012-12-19 Andreas Tobler * mips-tdep.c (micromips_deal_with_atomic_sequence): Initialize branch_bp to keep gcc happy. Index: mips-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mips-tdep.c,v retrieving revision 1.564 diff -u -r1.564 mips-tdep.c --- mips-tdep.c 12 Nov 2012 21:59:07 -0000 1.564 +++ mips-tdep.c 19 Dec 2012 20:05:21 -0000 @@ -3796,7 +3796,8 @@ const int atomic_sequence_length = 16; /* Instruction sequence length. */ int last_breakpoint = 0; /* Defaults to 0 (no breakpoints placed). */ CORE_ADDR breaks[2] = {-1, -1}; - CORE_ADDR branch_bp; /* Breakpoint at branch instruction's destination. */ + CORE_ADDR branch_bp = 0; /* Breakpoint at branch instruction's + destination. */ CORE_ADDR loc = pc; int sc_found = 0; ULONGEST insn;