This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch installed for cp dir warnings
- To: egcs-patches at egcs dot cygnus dot com
- Subject: Patch installed for cp dir warnings
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Tue, 4 Apr 2000 16:47:44 -0400 (EDT)
I installed a few obvious prototype/const warning fixes in the cp dir.
2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cfns.gperf (hash, libc_name_p): Prototype.
* rtti.c (build_dynamic_cast_1): Constification.
* search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
* semantics.c (deferred_type_access_control): Prototype.
diff -rup orig/egcs-CVS20000404/gcc/cp/cfns.gperf egcs-CVS20000404/gcc/cp/cfns.gperf
--- orig/egcs-CVS20000404/gcc/cp/cfns.gperf Fri Mar 10 06:55:59 2000
+++ egcs-CVS20000404/gcc/cp/cfns.gperf Tue Apr 4 09:23:54 2000
@@ -1,3 +1,13 @@
+%{
+#ifdef __GNUC__
+__inline
+#endif
+static unsigned int hash PARAMS ((const char *, unsigned int));
+#ifdef __GNUC__
+__inline
+#endif
+const char * libc_name_p PARAMS ((const char *, unsigned int));
+%}
# The standard C library functions, for feeding to gperf; the result is used
# by nothrow_libfn_p.
#
diff -rup orig/egcs-CVS20000404/gcc/cp/rtti.c egcs-CVS20000404/gcc/cp/rtti.c
--- orig/egcs-CVS20000404/gcc/cp/rtti.c Mon Apr 3 11:28:33 2000
+++ egcs-CVS20000404/gcc/cp/rtti.c Tue Apr 4 09:10:25 2000
@@ -559,7 +559,7 @@ build_dynamic_cast_1 (type, expr)
tree exprtype;
tree dcast_fn;
tree old_expr = expr;
- char* errstr = NULL;
+ const char *errstr = NULL;
/* T shall be a pointer or reference to a complete class type, or
`pointer to cv void''. */
diff -rup orig/egcs-CVS20000404/gcc/cp/search.c egcs-CVS20000404/gcc/cp/search.c
--- orig/egcs-CVS20000404/gcc/cp/search.c Tue Mar 28 17:17:34 2000
+++ egcs-CVS20000404/gcc/cp/search.c Tue Apr 4 09:30:12 2000
@@ -108,10 +108,8 @@ static tree marked_new_vtablep PARAMS ((
static tree unmarked_new_vtablep PARAMS ((tree, void *));
static tree marked_pushdecls_p PARAMS ((tree, void *));
static tree unmarked_pushdecls_p PARAMS ((tree, void *));
-#if 0
static tree dfs_debug_unmarkedp PARAMS ((tree, void *));
static tree dfs_debug_mark PARAMS ((tree, void *));
-#endif
static tree dfs_find_vbases PARAMS ((tree, void *));
static tree dfs_clear_vbase_slots PARAMS ((tree, void *));
static tree dfs_init_vbase_pointers PARAMS ((tree, void *));
diff -rup orig/egcs-CVS20000404/gcc/cp/semantics.c egcs-CVS20000404/gcc/cp/semantics.c
--- orig/egcs-CVS20000404/gcc/cp/semantics.c Sun Mar 26 23:23:34 2000
+++ egcs-CVS20000404/gcc/cp/semantics.c Tue Apr 4 09:31:20 2000
@@ -48,6 +48,7 @@
static tree expand_cond PARAMS ((tree));
static tree maybe_convert_cond PARAMS ((tree));
static tree simplify_aggr_init_exprs_r PARAMS ((tree *, int *, void *));
+static void deferred_type_access_control PARAMS ((void));
/* Record the fact that STMT was the last statement added to the
statement tree. */