This is the mail archive of the gcc@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]

egcs CVS 19980515, warning patch 4/4


	This is warning patch part 4/4.  Is it okay to install?

		--Kaveh

Note: these changes are all in the cp/ directory.

Installing parts 1 to 4 will eliminate around 150 more warnings.




Sun May 17 19:34:31 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* Makefile.in (parse.o): Depend on toplev.h.

	* class.c (typecode_p): Hide prototype and definition.

	* cp-tree.h (currently_open_class, is_empty_class, member_p):
	Add prototype.

	* decl.c (push_overloaded_decl_top_level): Hide prototype and
	definition.

	* errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
 	in call to `cp_thing'.
	(cp_warning): Likewise for function pointer `warning'.

	* except.c (do_function_call): Hide prototype and definition.
	(call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.

	* method.c (is_java_type): Add prototype and make it static.

	* parse.y: Include toplev.h.

	* pt.c (type_unification): Remove unused variable `arg'.
	(instantiate_decl): likewise for `save_ti'.

	* tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
	



diff -rup orig/egcs-C19980515/gcc/cp/Makefile.in egcs-C19980515/gcc/cp/Makefile.in
--- orig/egcs-C19980515/gcc/cp/Makefile.in	Fri May 15 09:44:59 1998
+++ egcs-C19980515/gcc/cp/Makefile.in	Sat May 16 17:32:21 1998
@@ -202,7 +202,8 @@ PARSE_H = $(srcdir)/parse.h
 PARSE_C = $(srcdir)/parse.c
 
 parse.o : $(PARSE_C) $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h lex.h \
-	$(srcdir)/../except.h $(srcdir)/../output.h $(srcdir)/../system.h
+	$(srcdir)/../except.h $(srcdir)/../output.h $(srcdir)/../system.h \
+	$(srcdir)/../toplev.h
 	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(BIG_SWITCHFLAG) \
   `echo $(PARSE_C) | sed 's,^\./,,'`
 
diff -rup orig/egcs-C19980515/gcc/cp/class.c egcs-C19980515/gcc/cp/class.c
--- orig/egcs-C19980515/gcc/cp/class.c	Fri May 15 09:45:00 1998
+++ egcs-C19980515/gcc/cp/class.c	Sat May 16 17:32:21 1998
@@ -90,7 +90,9 @@ static tree get_vfield_name PROTO((tree)
 static void finish_struct_anon PROTO((tree));
 static tree build_vbase_pointer PROTO((tree, tree));
 static int complete_type_p PROTO((tree));
+#if 0
 static int typecode_p PROTO((tree, enum tree_code));
+#endif
 static tree build_vtable_entry PROTO((tree, tree));
 static tree get_vtable_name PROTO((tree));
 static tree get_derived_offset PROTO((tree, tree));
@@ -1729,6 +1731,7 @@ finish_base_struct (t, b)
   return first_vfn_base_index;
 }
 
+#if 0
 static int
 typecode_p (type, code)
      tree type;
@@ -1738,6 +1741,7 @@ typecode_p (type, code)
 	  || (TREE_CODE (type) == REFERENCE_TYPE
 	      && TREE_CODE (TREE_TYPE (type)) == code));
 }
+#endif
 
 /* Set memoizing fields and bits of T (and its variants) for later use.
    MAX_HAS_VIRTUAL is the largest size of any T's virtual function tables.  */
diff -rup orig/egcs-C19980515/gcc/cp/cp-tree.h egcs-C19980515/gcc/cp/cp-tree.h
--- orig/egcs-C19980515/gcc/cp/cp-tree.h	Fri May 15 09:44:59 1998
+++ egcs-C19980515/gcc/cp/cp-tree.h	Sat May 16 17:32:21 1998
@@ -2141,6 +2141,7 @@ extern tree build_vbase_path			PROTO((en
 extern tree build_vtbl_ref			PROTO((tree, tree));
 extern tree build_vfn_ref			PROTO((tree *, tree, tree));
 extern void add_method				PROTO((tree, tree *, tree));
+extern int currently_open_class			PROTO((tree));
 extern tree get_vfield_offset			PROTO((tree));
 extern void duplicate_tag_error			PROTO((tree));
 extern tree finish_struct			PROTO((tree, tree, tree, int));
@@ -2148,6 +2149,7 @@ extern tree finish_struct_1			PROTO((tre
 extern tree finish_struct_methods		PROTO((tree, tree, int));
 extern int resolves_to_fixed_type_p		PROTO((tree, int *));
 extern void init_class_processing		PROTO((void));
+extern int is_empty_class			PROTO((tree));
 extern void pushclass				PROTO((tree, int));
 extern void popclass				PROTO((int));
 extern void push_nested_class			PROTO((tree, int));
@@ -2684,6 +2686,7 @@ extern int yylex				PROTO((void));
 extern tree arbitrate_lookup			PROTO((tree, tree, tree));
 
 /* in tree.c */
+extern int member_p				PROTO((tree));
 extern int real_lvalue_p			PROTO((tree));
 extern tree build_min				PVPROTO((enum tree_code, tree, ...));
 extern tree build_min_nt			PVPROTO((enum tree_code, ...));
diff -rup orig/egcs-C19980515/gcc/cp/decl.c egcs-C19980515/gcc/cp/decl.c
--- orig/egcs-C19980515/gcc/cp/decl.c	Fri May 15 09:45:01 1998
+++ egcs-C19980515/gcc/cp/decl.c	Sat May 16 17:32:22 1998
@@ -132,7 +132,9 @@ static tree grokparms				PROTO((tree, in
 static tree lookup_nested_type			PROTO((tree, tree));
 static char *redeclaration_error_message	PROTO((tree, tree));
 static tree push_overloaded_decl		PROTO((tree, int));
+#if 0
 static void push_overloaded_decl_top_level	PROTO((tree, int));
+#endif
 
 static struct stack_level *push_decl_level PROTO((struct stack_level *,
 						  struct obstack *));
@@ -3693,6 +3695,7 @@ pushdecl_top_level (x)
 /* Like push_overloaded_decl, only it places X in GLOBAL_BINDING_LEVEL,
    if appropriate.  */
 
+#if 0
 static void
 push_overloaded_decl_top_level (x, forget)
      tree x;
@@ -3704,6 +3707,7 @@ push_overloaded_decl_top_level (x, forge
   push_overloaded_decl (x, forget);
   current_binding_level = b;
 }
+#endif
 
 /* Make the declaration of X appear in CLASS scope.  */
 
diff -rup orig/egcs-C19980515/gcc/cp/errfn.c egcs-C19980515/gcc/cp/errfn.c
--- orig/egcs-C19980515/gcc/cp/errfn.c	Fri May 15 09:45:02 1998
+++ egcs-C19980515/gcc/cp/errfn.c	Sat May 16 17:32:22 1998
@@ -200,7 +200,7 @@ DECLARE (cp_error)
   va_list ap;
   INIT;
   if (! cp_silent)
-    cp_thing (error, 0, format, ap);
+    cp_thing ((errorfn *) error, 0, format, ap);
   va_end (ap);
 }
 
@@ -209,7 +209,7 @@ DECLARE (cp_warning)
   va_list ap;
   INIT;
   if (! cp_silent)
-    cp_thing (warning, 0, format, ap);
+    cp_thing ((errorfn *) warning, 0, format, ap);
   va_end (ap);
 }
 
diff -rup orig/egcs-C19980515/gcc/cp/except.c egcs-C19980515/gcc/cp/except.c
--- orig/egcs-C19980515/gcc/cp/except.c	Fri May 15 09:45:02 1998
+++ egcs-C19980515/gcc/cp/except.c	Sat May 16 17:32:22 1998
@@ -45,7 +45,9 @@ tree builtin_return_address_fndecl;
 /* A couple of backend routines from m88k.c */
 
 static void push_eh_cleanup PROTO((void));
+#if 0
 static rtx do_function_call PROTO((tree, tree, tree));
+#endif
 static tree build_eh_type_type PROTO((tree));
 static tree build_eh_type PROTO((tree));
 static void expand_end_eh_spec PROTO((tree));
@@ -184,6 +186,7 @@ extern tree const_ptr_type_node;
 
 /* Cheesyness to save some typing.  Returns the return value rtx.  */
 
+#if 0
 static rtx
 do_function_call (func, params, return_type)
      tree func, params, return_type;
@@ -195,6 +198,7 @@ do_function_call (func, params, return_t
     return hard_function_value (return_type, func_call);
   return NULL_RTX;
 }
+#endif
 
 /* ========================================================================= */
 
@@ -267,7 +271,10 @@ call_eh_info ()
     fn = IDENTIFIER_GLOBAL_VALUE (fn);
   else
     {
-      tree t1,t, fields[7];
+#ifdef NEW_EH_MODEL
+      tree t1;
+#endif
+      tree t, fields[7];
       int fo = 0;
 
       /* Declare cp_eh_info * __cp_exception_info (void),
diff -rup orig/egcs-C19980515/gcc/cp/method.c egcs-C19980515/gcc/cp/method.c
--- orig/egcs-C19980515/gcc/cp/method.c	Fri May 15 09:45:06 1998
+++ egcs-C19980515/gcc/cp/method.c	Sat May 16 17:32:22 1998
@@ -83,6 +83,7 @@ static int issue_ktype PROTO((tree));
 static void build_overload_scope_ref PROTO((tree));
 static void build_mangled_template_parm_index PROTO((char *, tree));
 static int check_btype PROTO((tree));
+static int is_java_type PROTO((tree));
 
 # define OB_INIT() (scratch_firstobj ? (obstack_free (&scratch_obstack, scratch_firstobj), 0) : 0)
 # define OB_PUTC(C) (obstack_1grow (&scratch_obstack, (C)))
@@ -1117,7 +1118,7 @@ process_modifiers (parmtype) 
 
 /* True iff TYPE was declared as a "Java" type (inside extern "Java"). */
 
-int
+static int
 is_java_type (type)
      tree type;
 {
diff -rup orig/egcs-C19980515/gcc/cp/parse.c egcs-C19980515/gcc/cp/parse.c
--- orig/egcs-C19980515/gcc/cp/parse.c	Fri May 15 09:53:57 1998
+++ egcs-C19980515/gcc/cp/parse.c	Sat May 16 17:33:03 1998
@@ -107,6 +107,7 @@
 #include "cp-tree.h"
 #include "output.h"
 #include "except.h"
+#include "toplev.h"
 
 /* Since parsers are distinct for each language, put the language string
    definition here.  (fnf) */
diff -rup orig/egcs-C19980515/gcc/cp/parse.y egcs-C19980515/gcc/cp/parse.y
--- orig/egcs-C19980515/gcc/cp/parse.y	Fri May 15 09:45:05 1998
+++ egcs-C19980515/gcc/cp/parse.y	Sat May 16 17:32:22 1998
@@ -41,6 +41,7 @@ Boston, MA 02111-1307, USA.  */
 #include "cp-tree.h"
 #include "output.h"
 #include "except.h"
+#include "toplev.h"
 
 /* Since parsers are distinct for each language, put the language string
    definition here.  (fnf) */
diff -rup orig/egcs-C19980515/gcc/cp/pt.c egcs-C19980515/gcc/cp/pt.c
--- orig/egcs-C19980515/gcc/cp/pt.c	Fri May 15 09:45:06 1998
+++ egcs-C19980515/gcc/cp/pt.c	Sat May 16 17:32:22 1998
@@ -5667,7 +5667,6 @@ type_unification (tparms, targs, parms, 
      unification_kind_t strict;
      int allow_incomplete;
 {
-  tree arg;
   int* explicit_mask;
   int i;
 
@@ -6961,7 +6960,6 @@ instantiate_decl (d)
   tree args = TI_ARGS (ti);
   tree td;
   tree decl_pattern, code_pattern;
-  tree save_ti;
   int nested = in_function_p ();
   int d_defined;
   int pattern_defined;
diff -rup orig/egcs-C19980515/gcc/cp/tree.c egcs-C19980515/gcc/cp/tree.c
--- orig/egcs-C19980515/gcc/cp/tree.c	Fri May 15 09:45:08 1998
+++ egcs-C19980515/gcc/cp/tree.c	Sat May 16 17:32:22 1998
@@ -570,7 +570,6 @@ propagate_binfo_offsets (binfo, offset)
       else
 	{
 	  int j;
-	  tree base_binfos = BINFO_BASETYPES (base_binfo);
 	  tree delta = NULL_TREE;
 
 	  for (j = i+1; j < n_baselinks; j++)


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