This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/32132] bogus warning at -O3 ( 'r' may be used uninitialized in this function ).
- From: "pluto at agmk dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 May 2007 20:16:35 -0000
- Subject: [Bug c++/32132] bogus warning at -O3 ( 'r' may be used uninitialized in this function ).
- References: <bug-32132-7667@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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 <typename R>
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