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++/45609] [4.3/4.4/4.5/4.6 Regression] 'is used uninitialized' becomes 'may be used uninitialized' on unrelated code changes (namespace addition)



------- Comment #3 from jakub at gcc dot gnu dot org  2010-09-09 11:56 -------
I don't see any problem.  All of current trunk, 4.5 and 4.4 print it as
b.B::t.T::MBUUITF
rather than
b$t$MBUUITF
and the other difference in the warning message is not caused by unrelated code
changes, but actually very much related.
With -UBAD_NAMESPACE ::f() function is defined in the current TU and thus the
compiler knows it doesn't throw and that D::D() doesn't throw either, with
-DBAD_NAMESPACE ::f() is only declared and so the compiler doesn't know it it
throws or doesn't, and similarly for D::D().  The is used uninitialized warning
is emitted only in basic blocks that are always executed (with -UBAD_NAMESPACE
if A::A() is called, it will always pass the uninitialized var to C::g(int);
with -DBAD_NAMESPACE if ::f() throws then that wouldn't happen.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


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


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