This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
wrong warning..
- To: egcs-bugs at cygnus dot com
- Subject: wrong warning..
- From: Dirk Sorges <socke at aquaplan dot de>
- Date: Wed, 16 Sep 1998 14:01:01 +0200 (MET DST)
hi there,
we are using egcs on solaris 2.6 and linux 2.0.34.
egcs -v on linux:
Reading specs from /usr/local/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.91.57/specs
gcc version egcs-2.91.57 19980901 (egcs-1.1 release)
when compiling the appended source code with
g++ -c bug.cc -O2 -Wuninitialized
the following output appears (ONLY UNDER LINUX):
bug.cc: In function `bool f()':
bug.cc:24: warning: `bool c' might be used uninitialized in this function
(when commenting out dtor of class S - no warning)
i guess its no serious bug but we are compiling all of our sources
with -Werror and we get very much of that warning-stuff above.
so i will be very pleased if this is solved.
thanks in advance
dirk sorges (socke@aquaplan.de)
------------------- bug.cc ---------------------------------------
class S {
public:
S();
~S();
friend int operator==(const S&, int);
};
class B {
public:
S a();
};
bool f()
{
B b;
bool c = (b.a() == 1);
bool d = (b.a() == 2);
return (c && d);
}
------------------------------------------------------------------