This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[C++ patch]: Fix for return-statement with a value, in function declared with a void return type.


Hi there,

.../testsuite/23_containers/map_operators.cc:44: return-statement with a value, in function declared with a void return type

I'm not sure if this was intentional,  ie. somebody wanted the test to
fail, but I believe the return ought to be removed. This happened with
a recent checkout  from gcc-3_0-branch, but  the same bug is  in HEAD,
too.

OK to install?

Cheers.

l8er
manfred

2001-02-24  Manfred Hollstein  <manfredh@redhat.com>

	* testsuite/23_containers/map_operators.cc (test01): Remove return
	statement with a value, in function declared with a void return type.

diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el gcc-3.0.orig/libstdc++-v3/testsuite/23_containers/map_operators.cc gcc-3.0/libstdc++-v3/testsuite/23_containers/map_operators.cc
--- gcc-3.0.orig/libstdc++-v3/testsuite/23_containers/map_operators.cc	Thu Dec 21 23:08:39 2000
+++ gcc-3.0/libstdc++-v3/testsuite/23_containers/map_operators.cc	Sat Feb 24 08:46:13 2001
@@ -40,8 +40,6 @@ void test01()
   
   test &= itr != mapByName.end(); // XXX - notice, it's not mapByIndex!!
   test &= itr == mapByName.end(); // XXX - notice, it's not mapByIndex!!
-
-  return 0;
 }
 
 // http://gcc.gnu.org/ml/libstdc++/2000-11/msg00093.html


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]