wrong warning..
Dirk Sorges
socke@aquaplan.de
Wed Sep 16 05:01:00 GMT 1998
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);
}
------------------------------------------------------------------
More information about the Gcc-bugs
mailing list