From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10174 invoked by alias); 28 May 2007 20:16:44 -0000 Received: (qmail 10156 invoked by uid 48); 28 May 2007 20:16:35 -0000 Date: Mon, 28 May 2007 20:16:00 -0000 Message-ID: <20070528201635.10155.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/32132] bogus warning at -O3 ( 'r' may be used uninitialized in this function ). In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pluto at agmk dot net" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-05/txt/msg02530.txt.bz2 ------- Comment #3 from pluto at agmk dot net 2007-05-28 20:16 ------- (In reply to comment #2) > This might not be a bug .... > so, how 'r' can be used uninitialized in this case? template R hex_cast ( const std::string & s ) { if ( s.empty () ) throw bad_hex_cast (); R r; std::istringstream str ( s ); str >> std::hex >> r; return r; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32132