From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2501 invoked by alias); 30 May 2011 10:27:12 -0000 Received: (qmail 2491 invoked by uid 22791); 30 May 2011 10:27:12 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 30 May 2011 10:26:56 +0000 Received: (qmail 7866 invoked from network); 30 May 2011 10:26:55 -0000 Received: from unknown (HELO ?84.152.201.140?) (bernds@127.0.0.2) by mail.codesourcery.com with ESMTPA; 30 May 2011 10:26:55 -0000 Message-ID: <4DE370EA.1000501@codesourcery.com> Date: Mon, 30 May 2011 11:50:00 -0000 From: Bernd Schmidt User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110505 Lightning/1.0b3pre Thunderbird/3.1.10 MIME-Version: 1.0 To: Alexandre Oliva CC: gcc-patches@gcc.gnu.org Subject: Re: Initialize previous in read_state_param_structs References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-05/txt/msg02321.txt.bz2 On 05/30/2011 11:51 AM, Alexandre Oliva wrote: > Bootstrap-O3 complains about uninitialized uses of this variable in > gengtype-state.c. The variable can never actually be used before > initialization, but GCC is not smart enough to realize that. > read_state_structures, just before the function at hand, has a similar > loop and it zero-initializes both head and previous, so I adjusted the > affected function to follow the same pattern and avoid the bogus > warning. Regstrapped on x86_64-linux-gnu and i686-pc-linux-gnu. Ok to > install? Ok. Alternatively you could fix the warning and shorten the code using the pprev trick. Bernd