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++/25649] [4.2 regression] Bogus "uninitialized" warning



------- Comment #5 from martin at mpa-garching dot mpg dot de  2006-01-04 15:15 -------
(In reply to comment #4)
> (In reply to comment #3)
> 
> > We really don't set __n in all cases here.
> 
> And indeed we do *not* want to set __n in all cases: if for some reason the
> extraction fails __n *must* be left untouched. Per the standard, there isn't
> any doubt about that and note that before my patch the net behavior was
> *exactly* the same, only, for some reason, the warning was not emitted.

Hmm, if I understood correctly, this means that the variable is not set if the
reading operation fails. That sounds plausible, and in this case the warning is
perfectly OK and should not be suppressed. I had never thought of that ...


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25649



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