This is the mail archive of the gcc@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]

`strange warning'


In a project I'm working on, I get the following warning message (names
changed to protect the innocent:):

warning: `class foo * this' might be used uninitialized in this function

I actually get several, somewhere after the case statement that
initializes the foo *, but I can't figure out how to fix this as I have
never seen uninitialed this * warnings before using egcs (this is from a
recent build via the CVS tree).

Is this a bug in the compiler, or am I missing something important (eg
exceptions, gcc checking whether data members are initialized, something
else weird)?  

I got this message another time when I found some code as follows:

   ostrstream SS;
   SS << "0x" << iLine<< ": ";

But I fixed it by using ostrstream correctly (ie ostrstream
SS(string,size); )

An explanation of the mechanisms involved in this particular instance of
this warning would be greatly appreciated (I have no problems with
uninitialized local variables:).

Bill
-- 
Leave others their otherness


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