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]
Other format: [Raw text]

[patch, testsuite] Change free() decl in g++.dg/tree-ssa/copyprop.C


The test g++.dg/tree-ssa/copyprop.C is failing on IA64 HP-UX because the
test includes several headers (map, vector, iostream) and then has
'extern void free (void *);'.  On HP-UX we indirectly include cstdlib
from the other header files so we get a warning message about free()
being  redefined.  Since we are already including header files it seems
like we should include cstdlib to define free() instead of having an
explicit definition of free() in the source file.

Tested on IA64 HP_UX and Linux with no regression.

OK for checkin?


2009-10-21  Steve Ellcey  <sje@cup.hp.com>

	* g++.dg/tree-ssa/copyprop.C: Use include to define free().


Index: g++.dg/tree-ssa/copyprop.C
===================================================================
--- g++.dg/tree-ssa/copyprop.C	(revision 153048)
+++ g++.dg/tree-ssa/copyprop.C	(working copy)
@@ -7,8 +7,8 @@
 #include <map>
 #include <vector>
 #include <iostream>
+#include <cstdlib>
 using namespace std;
-extern void free (void *);
 template<typename _FIter, typename _Tp> _FIter lower_bound(_FIter, _FIter, _Tp&);
 template<class _Key> struct hash { };
 template<class _Val> struct _Hashtable_node {


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