Weird egcs-1.1a Warning Bug
Michael Roth
mroth@nessie.de
Fri Sep 4 08:02:00 GMT 1998
Hi,
given the following C++ programm "egcs1.1-bug1.cpp":
---------------------------------------------------
class Foobar
{
~Foobar();
friend int operator << (int, Foobar);
};
int operator << (int i, Foobar foobar)
{
}
---------------------------------------------------
egcs-1.1a doesn't warn about the missing return value in "operator <<".
Even if you use flags like -Wall, -W and -pedantic together or standalone.
If you change the second argument of "operator <<" to something else or
remove the dtor declaration "~Foobar()" egcs-1.1a will correctly warn.
This looks a little bit strange to me!?!?
I have included the testsuite results at the end of this mail. If you need
more details please feel free to contact me (I don't read the mailling
lists regulary).
cu
Michael Roth
Output of "c++ -v -Wall -c egcs1.1-bug1.cpp"
-----------------------------------------------------------------------------------
Reading specs from /usr/local/soft/egcs-1.1a/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.91.57/specs
gcc version egcs-2.91.57 19980901 (egcs-1.1 release)
/usr/local/soft/egcs-1.1a/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.91.57/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -Wall -Asystem(unix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di586 -Dpentium -D__i586 -D__i586__ -D__pentium -D__pentium__ egcs1.1-bug1.cpp /tmp/ccQYuSW9.ii
GNU CPP version egcs-2.91.57 19980901 (egcs-1.1 release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
/usr/local/soft/egcs-1.1a/include/g++
/usr/local/include
/usr/local/soft/egcs-1.1a/i586-pc-linux-gnulibc1/include
/usr/local/soft/egcs-1.1a/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.91.57/include
/usr/include
End of search list.
/usr/local/soft/egcs-1.1a/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.91.57/cc1plus /tmp/ccQYuSW9.ii -quiet -dumpbase egcs1.1-bug1.cc -Wall -version -o /tmp/ccaG1ZJe.s
GNU C++ version egcs-2.91.57 19980901 (egcs-1.1 release) (i586-pc-linux-gnulibc1) compiled by GNU C version egcs-2.91.57 19980901 (egcs-1.1 release).
/usr/local/soft/egcs-1.1a/i586-pc-linux-gnulibc1/bin/as -V -Qy -o egcs1.1-bug1.o /tmp/ccaG1ZJe.s
GNU assembler version 2.9.1 (i586-pc-linux-gnulibc1), using BFD version 2.9.1.0.7
-----------------------------------------------------------------------------------
Results for egcs-2.91.57 19980901 (egcs-1.1 release) testsuite on i586-pc-linux-gnulibc1:
-----------------------------------------------------------------------------------
Native configuration is i586-pc-linux-gnulibc1
=== libio tests ===
Running target unix
=== libio Summary ===
# of expected passes 40
=== libstdc++ tests ===
Running target unix
=== libstdc++ Summary ===
# of expected passes 30
=== gcc tests ===
Running target unix
FAIL: gcc.c-torture/execute/980526-1.c execution, -O2 -fomit-frame-pointer -finline-functions
FAIL: gcc.c-torture/execute/ieee/980619-1.c execution, -O1
FAIL: gcc.c-torture/execute/ieee/980619-1.c execution, -O2
FAIL: gcc.c-torture/execute/ieee/980619-1.c execution, -O2 -fomit-frame-pointer -finline-functions
FAIL: gcc.c-torture/execute/ieee/980619-1.c execution, -O2 -fomit-frame-pointer -finline-functions -funroll-loops
FAIL: gcc.c-torture/execute/ieee/980619-1.c execution, -O2 -fomit-frame-pointer -finline-functions -funroll-all-loops
FAIL: gcc.c-torture/execute/ieee/980619-1.c execution, -O2 -g
FAIL: gcc.c-torture/execute/ieee/980619-1.c execution, -Os
FAIL: gcc.dg/980626-1.c (test for excess errors)
FAIL: gcc.dg/clobbers.c execution test
=== gcc Summary ===
# of expected passes 7497
# of unexpected failures 10
# of expected failures 7
# of unsupported tests 11
/disks/hdc6/home/babs/egcs-compile/gcc/xgcc version egcs-2.91.57 19980901 (egcs-1.1 release)
=== g++ tests ===
Running target unix
XPASS: g++.pt/explicit69.C not a template instantiation (test for errors, line 2)
=== g++ Summary ===
# of expected passes 4222
# of unexpected successes 1
# of expected failures 84
# of untested testcases 7
/disks/hdc6/home/babs/egcs-compile/gcc/testsuite/../xgcc version egcs-2.91.57 19980901 (egcs-1.1 release)
=== g77 tests ===
Running target unix
=== g77 Summary ===
# of expected passes 415
configure flags: --with-gcc-version-trigger=/disks/hdc6/home/babs/egcs-1.1a/gcc/version.c --host=i586-pc-linux-gnulibc1 --prefix=/usr/local/soft/egcs-1.1a --norecursion
-----------------------------------------------------------------------------------
More information about the Gcc-bugs
mailing list