lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: [lmi] wxmsw-2.9.0 (svn trunk) anomaly


From: Vadim Zeitlin
Subject: Re[2]: [lmi] wxmsw-2.9.0 (svn trunk) anomaly
Date: Wed, 11 Mar 2009 14:59:14 +0100

On Tue, 10 Mar 2009 12:09:46 +0000 Greg Chicares <address@hidden> wrote:

GC> On 2009-03-10 08:50Z, Greg Chicares wrote:
GC> [...]
GC> > Updated for today's snapshot:
GC> 
GC> 'wxWidgets-2009-03-10.tar.bz2', that is. Filtering out libstdc++
GC> warnings leaves only these three:
GC> 
GC> ../src/common/event.cpp:1397: warning: 'loop' might be used uninitialized 
in this function

 I've finally understood why were we getting this warning on the line
initializing 'loop': the compiler is not smart enough to figure out that
wxEventLoopBase::GetActive() doesn't throw so it warns about the
possibility that it does. If my theory is correct, this should be fixed in
the next snapshot -- even if the warning is harmless (and it is), it's
better to not have it, of course. Unfortunately I can't check it myself as
my g++ version (4.1) doesn't give this warning, even in optimized build.

 As a side note, I wouldn't bet much on the quality of optimizer in the
version of g++ you use as GetActive() is a simple inline function
consisting of a single return statement. If the compiler doesn't inline it
properly (and the warning shouldn't occur if it did) it's rather worrisome.

GC> ../src/common/docview.cpp:1327: warning: 'docNew' might be used 
uninitialized in this function

 This seems to be another instance of the same problem as above so I'll
work around it in the same way if you could please confirm that my
correction of the previous problem worked.

GC> ../src/html/m_tables.cpp:772: warning: 'boldOld' might be used 
uninitialized in this function

 I do see this one, I thought that g++ would be able to figure out that in

        int boldOld;
        if ( cond )
                initialize boldOld

        ...

        if ( cond )
                use boldOld

'boldOld' may not be used uninitialized but I was clearly too optimistic,
fixed this now.

 Thanks,
VZ

reply via email to

[Prev in Thread] Current Thread [Next in Thread]