This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/32132] bogus warning at -O3 ( 'r' may be used uninitialized in this function ).



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]