This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch installed to fix cp warnings, seems to fix a few tests too
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 10 Mar 2002 15:51:52 -0500 (EST)
- Subject: Patch installed to fix cp warnings, seems to fix a few tests too
The patch below fixes a bunch of warnings in the cp directory:
> cp/except.c:608: warning: implicit declaration of function `stabilize_expr'
> cp/except.c:608: warning: initialization makes pointer from integer without a cast
> cp/except.c:619: warning: assignment makes pointer from integer without a cast
> cp/tree.c:2506: warning: function declaration isn't a prototype
Note on sparc-sun-solaris2.7, sizeof(int) != sizeof(ptr) so the
implicit declaration of stabilize_expr truncates the return value.
This may be significant since when I tested it, tests which previously
failed started to work.
< FAIL: g++.benjamin/15071.C Execution test
< FAIL: g++.brendan/copy9.C Execution test
< FAIL: g++.brendan/ptolemy2.C Execution test
< FAIL: g++.jason/2371.C Execution test
< FAIL: g++.jason/template24.C Execution test
< FAIL: g++.law/virtual3.C Execution test
< FAIL: g++.mike/net46.C Execution test
< FAIL: g++.robertl/eb46.C Execution test
< FAIL: 27_io/iostream_members.cc execution test
< FAIL: ext/rope.cc execution test
I installed it as an obvious fix.
--Kaveh
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/ChangeLog,v
retrieving revision 1.2696
diff -u -p -r1.2696 ChangeLog
--- ChangeLog 2002/03/09 02:22:42 1.2696
+++ ChangeLog 2002/03/10 20:42:20
@@ -1,3 +1,7 @@
+2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * cp-tree.h (stabilize_expr): Prototype.
+
2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
* cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
Index: cp-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/cp-tree.h,v
retrieving revision 1.685
diff -u -p -r1.685 cp-tree.h
--- cp-tree.h 2002/03/09 02:22:43 1.685
+++ cp-tree.h 2002/03/10 20:42:21
@@ -4222,6 +4222,7 @@ extern void replace_defarg PARAMS ((tr
extern void end_input PARAMS ((void));
/* in tree.c */
+extern tree stabilize_expr PARAMS ((tree, tree *));
extern tree cxx_unsave_expr_now PARAMS ((tree));
extern void init_tree PARAMS ((void));
extern int pod_type_p PARAMS ((tree));