[Bug c++/32132] bogus warning at -O3 ( 'r' may be used uninitialized in this function ).
pluto at agmk dot net
gcc-bugzilla@gcc.gnu.org
Mon May 28 20:16:00 GMT 2007
------- 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
More information about the Gcc-bugs
mailing list