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: 29 May 2007 08:50:29 -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 #6 from pluto at agmk dot net 2007-05-29 08:50 -------
(In reply to comment #5)
> Which shows for sure r may be used unitialized.
yes, but even if i catch possible i/o failure, gcc still produces warning.
--- auHexCastTest.ii.orig
+++ auHexCastTest.ii
@@ -18958,7 +18958,12 @@
R r;
stlp_std::istringstream str ( s );
- str >> stlp_std::hex >> r;
+ str.exceptions ( stlp_std::istringstream::eofbit ||
stlp_std::istringstream::badbit || stlp_std::istringstream::failbit );
+ try {
+ str >> stlp_std::hex >> r;
+ } catch ( stlp_std::istringstream::failure ) {
+ throw;
+ }
return r;
}
so, is it still an invalid testcase?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32132