public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* `strange warning'
@ 1998-06-29 23:17 Bill Currie
  0 siblings, 0 replies; only message in thread
From: Bill Currie @ 1998-06-29 23:17 UTC (permalink / raw)
  To: egcs

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-06-29 23:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-06-29 23:17 `strange warning' Bill Currie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).