This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
`strange warning'
- To: egcs at cygnus dot com
- Subject: `strange warning'
- From: Bill Currie <bcurrie at tssc dot co dot nz>
- Date: Tue, 30 Jun 1998 18:14:26 +1200
- Organization: Telecommunication Systems Support Centre
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