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]

egcs, warning patches for ch/ dir part 1/3


	This is part 1/3.  Okay to install?


Fri Sep 18 14:59:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* Makefile.in (actions.o, convert.o, decl.o, expr.o, lang.o,
	lex.o, loop.o, parse.o, satisfy.o, timing.o, tasking.o, tree.o,
	typeck.o): Depend on system.h and toplev.h.
	(except.o): Depend on toplev.h.
	(grant.o): Depend on system.h, toplev.h and output.h.

	* actions.c: Include system.h and toplev.h.  Remove redundant
 	prototypes.
	(build_cause_exception): Add default case in switch.
	(update_else_range_for_range): Add parentheses around && within ||.
	(chill_handle_multi_case_label_list): Remove unused variable
	`selector_value'.
	(print_missing_cases): Reconcile format specifiers vs arguments in
 	calls to sprintf.

	* ch-tree.h: Don't include stdio.h.  Wrap prototypes using FILE*
 	with macro BUFSIZ.  Add missing prototypes.

	* convert.c: Include system.h and toplev.h.  Remove redundant
	prototypes.
  	(convert): Remove unused variable `errstr'.

	* decl.c: Include system.h and toplev.h.  Remove redundant
 	prototypes.
	(builtin_scope): Add missing initializers.
	(clear_scope): Likewise.
	(allocate_lang_decl): Mark parameter `t' with ATTRIBUTE_UNUSED.
	(copy_lang_decl): Likewise for parameter `node'.
	(c_decode_option): Likewise for parameter `argc'.
	(push_extern_function): Likewise for parameter `granting'.
	(switch_to_pass_2): Hide declaration of errorcount/sorrycount.
	(pushdecl): Remove unused variable `t'.
	(lookup_name_current_level): Make static and hide.
	(lookup_name_for_seizing): Make static.
	(finish_decl): Remove unused variable `type'.
	(maybe_build_cleanup): Mark parameter `decl' with ATTRIBUTE_UNUSED.
	(complete_array_type): Mark parameters `type', `initial_value' and
 	`do_default' with ATTRIBUTE_UNUSED.
	(start_struct): Mark parameter `name' with ATTRIBUTE_UNUSED.
	(start_enum): Likewise.
	(shadow_record_fields): Remove unused variables `type' and `parent'.

	* except.c: Include toplev.h.  Remove redundant prototypes.

diff -rup orig/egcs-CVS19980918/gcc/ch/Makefile.in egcs-CVS19980918/gcc/ch/Makefile.in
--- orig/egcs-CVS19980918/gcc/ch/Makefile.in	Fri Sep 18 16:40:40 1998
+++ egcs-CVS19980918/gcc/ch/Makefile.in	Fri Sep 18 17:08:17 1998
@@ -270,34 +270,49 @@ $(srcdir)/hash.h:
 	$(RM) gperf.tmp gperf.tmp2 sed.tmp
 
 actions.o : actions.c $(CONFIG_H) $(CHILL_TREE_H) actions.h $(RTL_H) \
-	      lex.h $(srcdir)/../flags.h $(srcdir)/../../include/obstack.h $(srcdir)/../input.h $(srcdir)/../expr.h ../insn-codes.h
-convert.o : convert.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../flags.h $(srcdir)/../tree.h
-decl.o : decl.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../flags.h lex.h
-except.o : except.c $(CONFIG_H) $(srcdir)/../tree.h $(RTL_H) $(CHILL_TREE_H)
+	lex.h $(srcdir)/../flags.h $(srcdir)/../../include/obstack.h \
+	$(srcdir)/../input.h $(srcdir)/../expr.h ../insn-codes.h \
+	$(srcdir)/../system.h $(srcdir)/../toplev.h
+convert.o : convert.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../flags.h \
+	$(srcdir)/../tree.h $(srcdir)/../system.h $(srcdir)/../toplev.h
+decl.o : decl.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../flags.h lex.h \
+	$(srcdir)/../system.h $(srcdir)/../toplev.h
+except.o : except.c $(CONFIG_H) $(srcdir)/../tree.h $(RTL_H) $(CHILL_TREE_H) \
+	$(srcdir)/../toplev.h
 expr.o : expr.c $(CONFIG_H) $(RTL_H) $(CHILL_TREE_H) $(srcdir)/../flags.h \
-	$(srcdir)/../expr.h ../insn-codes.h $(srcdir)/../tree.h lex.h
-grant.o: grant.c $(CONFIG_H) $(CHILL_TREE_H) $(RTL_H) $(srcdir)/../flags.h $(srcdir)/../input.h \
-            lex.h actions.h $(srcdir)/../input.h
-inout.o : inout.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../flags.h $(srcdir)/../input.h
-lang.o : lang.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../input.h lex.h
-lex.o : lex.c $(CONFIG_H) $(CHILL_TREE_H) $(RTL_H) $(srcdir)/../flags.h $(srcdir)/../input.h \
-           $(srcdir)/parse.h $(srcdir)/../../include/obstack.h lex.h
+	$(srcdir)/../expr.h ../insn-codes.h $(srcdir)/../tree.h lex.h \
+	$(srcdir)/../system.h $(srcdir)/../toplev.h
+grant.o: grant.c $(CONFIG_H) $(CHILL_TREE_H) $(RTL_H) $(srcdir)/../flags.h \
+	$(srcdir)/../input.h lex.h actions.h $(srcdir)/../system.h \
+	$(srcdir)/../toplev.h $(srcdir)/../output.h
+inout.o : inout.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../flags.h \
+	$(srcdir)/../input.h $(srcdir)/../system.h $(srcdir)/../toplev.h
+lang.o : lang.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../input.h lex.h \
+	$(srcdir)/../system.h $(srcdir)/../toplev.h
+lex.o : lex.c $(CONFIG_H) $(CHILL_TREE_H) $(RTL_H) $(srcdir)/../flags.h \
+	$(srcdir)/../input.h $(srcdir)/parse.h $(srcdir)/../system.h \
+	$(srcdir)/../toplev.h $(srcdir)/../../include/obstack.h lex.h
 lex.c: hash.h
 loop.o : loop.c $(CONFIG_H) $(RTL_H) $(CHILL_TREE_H) lex.h \
 	$(srcdir)/../flags.h $(srcdir)/../input.h \
-	$(srcdir)/../../include/obstack.h $(srcdir)/../tree.h
+	$(srcdir)/../../include/obstack.h $(srcdir)/../tree.h \
+	$(srcdir)/../system.h $(srcdir)/../toplev.h
 parse.o : parse.c $(CONFIG_H) $(CHILL_TREE_H) parse.h \
-	lex.h actions.h tasking.h
+	lex.h actions.h tasking.h $(srcdir)/../system.h $(srcdir)/../toplev.h
 satisfy.o : satisfy.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../tree.h \
-	$(srcdir)/../flags.h lex.h
+	$(srcdir)/../flags.h lex.h $(srcdir)/../system.h $(srcdir)/../toplev.h
 timing.o : timing.c $(CONFIG_H) $(CHILL_TREE_H) $(RTL_H) $(srcdir)/../flags.h \
-	$(srcdir)/../input.h $(srcdir)/../../include/obstack.h lex.h
+	$(srcdir)/../input.h $(srcdir)/../../include/obstack.h lex.h \
+	$(srcdir)/../system.h $(srcdir)/../toplev.h
 tasking.o : tasking.c $(CONFIG_H) $(CHILL_TREE_H) $(RTL_H) \
 	$(srcdir)/../flags.h $(srcdir)/../input.h \
-	$(srcdir)/../../include/obstack.h lex.h
-tree.o : tree.c $(CONFIG_H) $(CHILL_TREE_H)
+	$(srcdir)/../../include/obstack.h lex.h $(srcdir)/../system.h \
+	$(srcdir)/../toplev.h
+tree.o : tree.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../system.h \
+	$(srcdir)/../toplev.h
 typeck.o : typeck.c $(CONFIG_H) $(CHILL_TREE_H) ../insn-codes.h \
-	$(srcdir)/../expr.h $(srcdir)/../flags.h lex.h
+	$(srcdir)/../expr.h $(srcdir)/../flags.h lex.h $(srcdir)/../system.h \
+	$(srcdir)/../toplev.h
 ch-version.o : ch-version.c
 ch-version.c : Makefile
 	echo 'char *gnuchill_version = "$(GNUCHILL_VERSION)";' > $@
diff -rup orig/egcs-CVS19980918/gcc/ch/actions.c egcs-CVS19980918/gcc/ch/actions.c
--- orig/egcs-CVS19980918/gcc/ch/actions.c	Fri Sep 18 16:40:40 1998
+++ egcs-CVS19980918/gcc/ch/actions.c	Fri Sep 18 17:07:48 1998
@@ -18,9 +18,8 @@ You should have received a copy of the G
 along with GNU CC; see the file COPYING.  If not, write to
 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
-#include <stdio.h>
-#include <limits.h>
 #include "config.h"
+#include "system.h"
 #include "tree.h"
 #include "rtl.h"
 #include "expr.h"
@@ -30,6 +29,7 @@ the Free Software Foundation, 675 Mass A
 #include "actions.h"
 #include "obstack.h"
 #include "assert.h"
+#include "toplev.h"
 
 #define obstack_chunk_alloc xmalloc
 #define obstack_chunk_free free
@@ -43,18 +43,6 @@ the Free Software Foundation, 675 Mass A
 extern int flag_short_enums;
 extern int current_nesting_level;
 
-extern tree build_chill_compound_expr PROTO((tree));
-extern tree build_chill_exception_decl PROTO((char *));
-extern tree convert                   PROTO((tree, tree));
-extern rtx  emit_line_note_force      PROTO((char *, int));
-extern void error                     PROTO((char *, ...));
-extern void error_with_decl           PROTO((tree, char *, ...));
-extern rtx  gen_nop                   PROTO((void));
-extern tree get_identifier            PROTO((char *));
-extern void pedwarn                   PROTO((char *, ...));
-extern void sorry                     PROTO((char *, ...));
-extern void warning                   PROTO((char *, ...));
-
 extern struct obstack *expression_obstack, permanent_obstack;
 extern struct obstack *current_obstack, *saveable_obstack;
 
@@ -337,6 +325,8 @@ build_cause_exception (exp_name, warn_if
       if (lineno == NULL_TREE)
 	lineno = error_mark_node;
       break;
+    default:
+      abort();
     }
   result =
     build_chill_function_call (function,
@@ -849,8 +839,8 @@ update_else_range_for_range (else_range,
     {
       low_range_val  = TREE_INT_CST_LOW (TREE_PURPOSE (this_range));
       high_range_val = TREE_INT_CST_LOW (TREE_VALUE (this_range));
-      if (low_target_val >= low_range_val && low_target_val <= high_range_val
-	  || high_target_val >= low_range_val && high_target_val <= high_range_val)
+      if ((low_target_val >= low_range_val && low_target_val <= high_range_val)
+	  || (high_target_val >= low_range_val && high_target_val <= high_range_val))
 	break;
       prev_range = this_range;
     }
@@ -1305,7 +1295,7 @@ static tree
 chill_handle_multi_case_label_list (selector, labels)
   tree selector, labels;
 {
-  tree one_label, selector_value, larg, rarg;
+  tree one_label, larg, rarg;
 
   one_label = TREE_VALUE (labels);
   larg = chill_handle_multi_case_label (selector, TREE_VALUE (one_label));
@@ -1352,9 +1342,6 @@ build_multi_case_selector_expression (se
   ((ARRAY)[(unsigned)(INDEX) / HOST_BITS_PER_CHAR]\
 			  |= 1 << ((unsigned)(INDEX) % HOST_BITS_PER_CHAR))
 
-extern HOST_WIDE_INT all_cases_count PROTO((tree, int*));
-extern void mark_seen_cases PROTO((tree, unsigned char*, long, int));
-
 /* CASES_SEEN is a set (bitarray) of length COUNT.
    For each element that is zero, print an error message,
    assume the element have the given TYPE. */
@@ -1388,9 +1375,9 @@ print_missing_cases (type, cases_seen, c
 	      break;
 	    case CHAR_TYPE:
 	      if ((x >= ' ' && x < 127) && x != '\'' && x != '^')
-		sprintf (buf, "'%c'", x);
+		sprintf (buf, "'%c'", (char)x);
 	      else
-		sprintf (buf, "'^(%d)'", x);
+		sprintf (buf, "'^(%ld)'", x);
 	      err_val_name = buf;
 	      j = i;
 	      while (j < count && !BITARRAY_TEST(cases_seen, j))
@@ -1400,9 +1387,9 @@ print_missing_cases (type, cases_seen, c
 		  long y = x+j-i-1;
 		  err_val_name += strlen (err_val_name);
 		  if ((y >= ' ' && y < 127) && y != '\'' && y != '^')
-		    sprintf (err_val_name, "%s:'%c'", buf, y);
+		    sprintf (err_val_name, "%s:'%c'", buf, (char)y);
 		  else
-		    sprintf (err_val_name, "%s:'^(%d)'", buf, y);
+		    sprintf (err_val_name, "%s:'^(%ld)'", buf, y);
 		  i = j - 1;      
 		}
 	      break;
@@ -1417,9 +1404,9 @@ print_missing_cases (type, cases_seen, c
 	      while (j < count && !BITARRAY_TEST(cases_seen, j))
 		j++;
 	      if (j == i + 1)
-		sprintf (buf, "%d", x);
+		sprintf (buf, "%ld", x);
 	      else
-		sprintf (buf, "%d:%d", x, x+j-i-1);
+		sprintf (buf, "%ld:%ld", x, x+j-i-1);
 	      i = j - 1;      
 	      err_val_name = buf;
 	      break;
diff -rup orig/egcs-CVS19980918/gcc/ch/ch-tree.h egcs-CVS19980918/gcc/ch/ch-tree.h
--- orig/egcs-CVS19980918/gcc/ch/ch-tree.h	Fri Sep 18 16:40:41 1998
+++ egcs-CVS19980918/gcc/ch/ch-tree.h	Fri Sep 18 17:07:48 1998
@@ -20,8 +20,6 @@ the Free Software Foundation, 675 Mass A
 #ifndef _CH_TREE_H
 #define _CH_TREE_H
 
-#include <stdio.h>
-
 /* Usage of TREE_LANG_FLAG_?:
    1: TUPLE_NAMED_FIELD
    "  TYPE_FIELDS_READONLY (in ARRAY_TYPE, RECORD_TYPE or UNION_TYPE)
@@ -643,7 +641,9 @@ extern tree combine_strings             
 extern void constant_expression_warning         PROTO((tree));
 extern void decl_attributes                     PROTO((tree, tree));
 extern void declare_function_name               PROTO((void));
+#ifdef BUFSIZ
 extern char *get_directive_line                 PROTO((FILE *));
+#endif
 extern tree shorten_compare                     PROTO((tree *, tree *, tree *, enum tree_code *));
 
 /* in c-decl.c */
@@ -718,9 +718,11 @@ extern void parmlist_tags_warning       
 extern void pending_xref_error                  PROTO((void));
 extern void pop_chill_function_context          PROTO((void));
 extern tree poplevel                            PROTO((int, int, int));
+#ifdef BUFSIZ
 extern void print_lang_decl                     PROTO((FILE *,tree, int));
 extern void print_lang_identifier               PROTO((FILE *,tree, int));
 extern void print_lang_type                     PROTO((FILE *,tree, int));
+#endif
 extern void push_chill_function_context         PROTO((void));
 extern void push_parm_decl                      PROTO((tree));
 extern tree pushdecl                            PROTO((tree));
@@ -783,6 +785,7 @@ extern tree build_chill_binary_op       
 extern tree build_chill_card                    PROTO((tree));
 extern tree build_chill_case_expr               PROTO((tree, tree, tree)); 
 extern tree build_cause_exception               PROTO((tree, int));
+extern tree build_chill_exception_decl          PROTO((char *));
 extern tree build_chill_function_call           PROTO((tree, tree));
 extern tree build_chill_length                  PROTO((tree));
 extern tree build_chill_indirect_ref            PROTO((tree, tree, int));
@@ -807,11 +810,13 @@ extern void chill_check_decl            
 extern tree chill_convert_for_assignment        PROTO((tree, tree, char*));
 extern void chill_expand_return                 PROTO((tree, int));
 extern void chill_expand_result                 PROTO((tree, int));
+extern void chill_handle_case_default           PROTO((void));
 extern void chill_handle_case_label		PROTO((tree, tree));
 extern int  chill_varying_string_type_p         PROTO((tree));
 extern int  chill_varying_type_p                PROTO((tree));
 extern int  ch_singleton_set                    PROTO((tree));
 extern tree check_expression                    PROTO((tree, tree, tree));
+extern void check_missing_cases                 PROTO((tree));
 extern tree check_non_null                      PROTO((tree));
 extern tree check_range                         PROTO((tree, tree, tree,tree));
 extern void cond_type_range_exception           PROTO((tree));
@@ -841,37 +846,52 @@ extern void do_chill_outparms           
 extern tree do_decl                             PROTO((tree, tree, int, int, tree, int));
 extern void do_decls                            PROTO((tree, tree, int, int, tree, int));
 extern void expand_chill_outparms               PROTO((void));
+extern void find_granted_decls		        PROTO((void));
 extern void finish_chill_function               PROTO(());
 extern tree finish_enum		                PROTO((tree, tree));
 extern void fixup_chill_parms                   PROTO((tree));
 extern void finish_outer_function               PROTO((void));
+extern unsigned get_type_precision              PROTO((tree, tree));
 extern tree grok_chill_fixedfields              PROTO((tree, tree, tree));
 extern tree grok_chill_variantdefs              PROTO((tree, tree, tree));
+extern void layout_enum                         PROTO((tree));
 /* extern tree lookup_remembered_decl PROTO((HOST_WIDE_INT, tree)); */
+extern void lookup_and_expand_goto		PROTO((tree));
 extern tree lookup_tag_fields		        PROTO((tree, tree));
+extern void lookup_and_handle_exit              PROTO((tree));
 extern tree massage_param_node			PROTO((tree, tree));
 extern void pop_module                          PROTO((void));
 extern void print_mode                          PROTO((tree));
 extern tree push_extern_function                PROTO((tree, tree, tree, tree, int));
 extern void push_extern_process                 PROTO((tree, tree, tree, int));
 extern void push_extern_signal                  PROTO((tree, tree, tree));
+extern void push_granted                        PROTO((tree, tree));
 extern tree push_modedef                        PROTO((tree, tree, int));
 extern tree push_module                         PROTO((tree, int));
 extern void push_parms                          PROTO((tree, tree, tree));
 extern void push_syndecl                        PROTO((tree, tree, tree));
 extern int result_never_set;
+extern void save_expr_under_name                PROTO((tree, tree));
+extern tree set_module_name                     PROTO((tree));
 extern int  start_chill_function                PROTO((tree, tree, tree, tree, tree));
 extern void start_outer_function	        PROTO((void));
 extern void switch_to_pass_2 	                PROTO((void));
 
 /* in ch/except.c */
 extern void chill_check_no_handlers             PROTO((void));
+extern void chill_finish_on                     PROTO((void));
+extern void chill_handle_on_labels              PROTO((tree));
 extern void chill_reraise_exceptions            PROTO((tree));
+extern void chill_start_default_handler         PROTO((void));
+extern void chill_start_on                      PROTO((void));
+extern void expand_goto_except_cleanup          PROTO((int));
+extern int is_handled				PROTO((tree));
 
 /* in ch/expr.c */
 extern tree build_chill_addr_expr               PROTO((tree, char *));
 extern tree build_chill_arrow_expr              PROTO((tree, int));
 extern tree build_component_ref		        PROTO((tree, tree));
+extern tree build_chill_compound_expr           PROTO((tree));
 extern tree build_chill_descr                   PROTO((tree));
 extern void build_chill_descr_type              PROTO((void));
 extern void build_chill_inttime_type            PROTO((void));
@@ -900,6 +920,7 @@ extern void start_outer_function	       
 extern void finish_chill_seize                  PROTO((tree));
 extern void chill_grant                         PROTO((tree,tree, tree, tree));
 extern void set_default_grant_file              PROTO((void));
+extern void set_identifier_size                 PROTO((int));
 extern void write_grant_file                    PROTO((void));
 extern void write_spec_module                   PROTO((tree, tree));
 
@@ -982,6 +1003,7 @@ extern tree build_chill_variable        
 extern tree build_chill_writeable               PROTO((tree));
 extern tree build_chill_writerecord             PROTO((tree, tree));
 extern tree build_chill_writetext               PROTO((tree, tree));
+extern void build_enum_tables                   PROTO((void));
 extern tree build_text_mode                     PROTO((tree, tree, int));
 extern tree check_text_length                   PROTO((tree, tree));
 extern void init_access_location                PROTO((tree, tree));
@@ -1048,6 +1070,9 @@ extern tree get_tasking_code_name       
 extern tree make_process_struct                 PROTO((tree, tree));
 extern tree make_signal_struct                  PROTO((tree));
 extern tree max_queue_size                      PROTO((tree));
+extern void tasking_init                        PROTO((void));
+extern void tasking_registry                    PROTO((void));
+extern void tasking_setup                       PROTO((void));
 
 /* in ch/timing.c */
 extern tree abs_timing_type_node;
@@ -1097,6 +1122,7 @@ extern ch_class chill_resulting_class   
 extern tree chill_resulting_mode                PROTO((tree, tree));
 extern int  chill_similar	                PROTO((tree, tree, struct mode_chain*));
 extern int  discrete_type_p			PROTO((tree));
+extern tree initializer_constant_valid_p        PROTO((tree, tree));
 extern tree convert_to_discrete                 PROTO((tree));
 extern tree smash_dummy_type                    PROTO((tree));
 extern tree string_assignment_condition         PROTO((tree, tree));
diff -rup orig/egcs-CVS19980918/gcc/ch/convert.c egcs-CVS19980918/gcc/ch/convert.c
--- orig/egcs-CVS19980918/gcc/ch/convert.c	Fri Sep 18 16:40:41 1998
+++ egcs-CVS19980918/gcc/ch/convert.c	Fri Sep 18 17:07:48 1998
@@ -24,14 +24,14 @@ the Free Software Foundation, 675 Mass A
    but what kind of conversions it does will depend on the language.  */
 
 #include "config.h"
+#include "system.h"
 #include "tree.h"
 #include "ch-tree.h"
 #include "flags.h"
 #include "convert.h"
 #include "lex.h"
+#include "toplev.h"
 
-extern void error                              PROTO((char *, ...));
-extern tree initializer_constant_valid_p       PROTO((tree, tree));
 extern tree bit_one_node, bit_zero_node;
 extern tree string_one_type_node;
 extern tree bitstring_one_type_node;
@@ -932,7 +932,6 @@ convert (type, expr)
 {
   register tree e = expr;
   register enum chill_tree_code code;
-  char *errstr;
   int type_varying;
 
   if (e == NULL_TREE || TREE_CODE (e) == ERROR_MARK)
diff -rup orig/egcs-CVS19980918/gcc/ch/decl.c egcs-CVS19980918/gcc/ch/decl.c
--- orig/egcs-CVS19980918/gcc/ch/decl.c	Fri Sep 18 16:40:41 1998
+++ egcs-CVS19980918/gcc/ch/decl.c	Fri Sep 18 17:07:49 1998
@@ -179,8 +179,8 @@
 /* ??? not all decl nodes are given the most useful possible
    line numbers.  For example, the CONST_DECLs for enum values.  */
 
-#include <stdio.h>
 #include "config.h"
+#include "system.h"
 #include "tree.h"
 #include "flags.h"
 #include "ch-tree.h"
@@ -188,6 +188,7 @@
 #include "obstack.h"
 #include "input.h"
 #include "rtl.h"
+#include "toplev.h"
 
 #define IS_UNKNOWN_TYPE(type) (TYPE_SIZE(type)==0)
 #define BUILTIN_NESTING_LEVEL (-1)
@@ -203,30 +204,12 @@ extern struct obstack *saveable_obstack;
 extern tree signal_code;
 extern int special_UC;
 
-extern void tasking_init              PROTO((void));
-extern void error                     PROTO((char *, ...));
-extern void error_with_decl           PROTO((tree, char *, ...));
-extern void expand_decl               PROTO((tree));
 static tree get_next_decl             PROTO((void));
-extern tree get_parm_decls            PROTO((void));
-extern void end_temporary_allocation  PROTO((void));
-extern void indent_to                 PROTO((FILE *, int));
-#ifdef RTX_CODE
-extern rtx  label_rtx                 PROTO((tree));
+static tree lookup_name_for_seizing   PROTO((tree));
+#if 0
+static tree lookup_name_current_level PROTO((tree));
 #endif
-extern tree lookup_name_for_seizing   PROTO((tree));
-extern tree lookup_name_current_level PROTO((tree));
-extern int  operand_equal_p           PROTO((tree, tree, int));
-extern void pedwarn_with_decl         PROTO((tree, char *, ...));
-extern void print_node                PROTO((FILE *, char *, tree, int));
-extern void push_granted              PROTO((tree, tree));
-extern void push_obstacks             PROTO((struct obstack *, struct obstack *));
-extern void rest_of_decl_compilation  PROTO((tree, char *, int, int));
-extern void sorry                     PROTO((char *, ...));
 static void save_decl                 PROTO((tree));
-extern void start_identifier_warnings PROTO((void));
-extern void temporary_allocation      PROTO((void));
-extern void warning                   PROTO((char *, ...));
 
 extern struct obstack permanent_obstack;
 extern int in_pseudo_module;
@@ -547,7 +530,9 @@ struct scope
 
 /* The outermost binding level, for pre-defined (builtin) names. */
 
-static struct scope builtin_scope = { NULL, NULL, NULL_TREE};
+static struct scope builtin_scope = {
+  NULL, NULL, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE,
+  NULL_TREE, NULL_TREE, NULL, 0, 0, NULL, NULL, NULL};
 
 struct scope *global_scope;
 
@@ -560,21 +545,14 @@ struct scope *last_scope = &builtin_scop
 
 /* Binding level structures are initialized by copying this one.  */
 
-static struct scope clear_scope
-  = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0};
+static struct scope clear_scope = {
+  NULL, NULL, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE,
+  NULL_TREE, NULL_TREE, NULL, 0, 0, NULL, NULL, NULL};
 
 /* Chain of decls accessible through IDENTIFIER_OUTER_VALUE.
    Decls with the same DECL_NAME are adjacent in the chain. */
 
 static tree outer_decls = NULL_TREE;
-
-/* Forward declarations.  */
-
-tree pushdecl ();
-tree builtin_function ();
-
-tree lookup_name_current_level ();
-static void layout_array_type ();
 
 /* C-specific option variables.  */
 
@@ -730,14 +708,14 @@ tree ALL_POSTFIX;
 
 void
 allocate_lang_decl (t)
-     tree t;
+     tree t ATTRIBUTE_UNUSED;
 {
   /* Nothing needed */
 }
 
 void
 copy_lang_decl (node)
-     tree node;
+     tree node ATTRIBUTE_UNUSED;
 {
   /* Nothing needed */
 }
@@ -757,7 +735,7 @@ build_lang_decl (code, name, type)
 
 int
 c_decode_option (argc, argv)
-     int argc;
+     int argc ATTRIBUTE_UNUSED;
      char **argv;
 {
   char *p = argv[0];
@@ -1342,8 +1320,8 @@ build_chill_function_type (return_type, 
  */
 tree
 push_extern_function (name, typespec, argtypes, exceptions, granting)
-     tree name, typespec, argtypes, exceptions;
-     int granting; /* If 0 do pushdecl(); if 1 do push_granted(). */
+  tree name, typespec, argtypes, exceptions;
+  int granting ATTRIBUTE_UNUSED;/*If 0 do pushdecl(); if 1 do push_granted()*/
 {
   tree ftype, fndecl;
   
@@ -2211,7 +2189,9 @@ get_next_decl ()
 void
 switch_to_pass_2 ()
 {
+#if 0
   extern int errorcount, sorrycount;
+#endif
   if (current_scope != &builtin_scope)
     abort ();
   last_scope = &builtin_scope;
@@ -3163,7 +3143,6 @@ tree
 pushdecl (x)
      tree x;
 {
-  register tree t;
   register tree name = DECL_NAME (x);
   register struct scope *b = current_scope;
 
@@ -3336,9 +3315,10 @@ lookup_name (name)
   return val;
 }
 
+#if 0
 /* Similar to `lookup_name' but look only at current binding level.  */
 
-tree
+static tree
 lookup_name_current_level (name)
      tree name;
 {
@@ -3347,8 +3327,9 @@ lookup_name_current_level (name)
     return val;
   return NULL_TREE;
 }
+#endif
 
-tree
+static tree
 lookup_name_for_seizing (seize_decl)
      tree seize_decl;
 {
@@ -4320,7 +4301,6 @@ void
 finish_decl (decl)
      tree decl;
 {
-  register tree type = TREE_TYPE (decl);
   int was_incomplete = (DECL_SIZE (decl) == 0);
   int temporary = allocation_temporary_p ();
 
@@ -4425,7 +4405,7 @@ finish_decl (decl)
 
 tree
 maybe_build_cleanup (decl)
-     tree decl;
+     tree decl ATTRIBUTE_UNUSED;
 {
   /* There are no cleanups in C.  */
   return NULL_TREE;
@@ -4437,8 +4417,8 @@ maybe_build_cleanup (decl)
 
 int
 complete_array_type (type, initial_value, do_default)
-     tree type, initial_value;
-     int do_default;
+     tree type ATTRIBUTE_UNUSED, initial_value ATTRIBUTE_UNUSED;
+     int do_default ATTRIBUTE_UNUSED;
 {
   /* Only needed so we can link with ../c-typeck.c. */
   abort ();
@@ -4454,7 +4434,7 @@ complete_array_type (type, initial_value
 tree
 start_struct (code, name)
      enum chill_tree_code code;
-     tree name;
+     tree name ATTRIBUTE_UNUSED;
 {
   /* If there is already a tag defined at this binding level
      (as a forward reference), just return it.  */
@@ -4538,7 +4518,7 @@ layout_array_type (t)
 
 tree
 start_enum (name)
-     tree name;
+     tree name ATTRIBUTE_UNUSED;
 {
   register tree enumtype;
 
@@ -5075,8 +5055,6 @@ void
 shadow_record_fields (struct_val)
      tree struct_val;
 {
-    tree type, parent;
-
     if (pass == 1 || struct_val == NULL_TREE)
       return;
 
diff -rup orig/egcs-CVS19980918/gcc/ch/except.c egcs-CVS19980918/gcc/ch/except.c
--- orig/egcs-CVS19980918/gcc/ch/except.c	Fri Sep 18 16:40:41 1998
+++ egcs-CVS19980918/gcc/ch/except.c	Fri Sep 18 17:07:49 1998
@@ -22,6 +22,7 @@ the Free Software Foundation, 675 Mass A
 #include "tree.h"
 #include "ch-tree.h"
 #include "rtl.h"
+#include "toplev.h"
 
 /* On Suns this can get you to the right definition if you
    set the right value for TARGET.  */
@@ -51,13 +52,6 @@ the Free Software Foundation, 675 Mass A
 #endif
 
 extern int  expand_exit_needed;
-extern tree build_chill_exception_decl PROTO((char *));
-extern void chill_handle_case_default  PROTO((void));
-extern void emit_jump                  PROTO((rtx));
-extern void expand_decl                PROTO((tree));
-extern void fatal                      PROTO((char *, ...));
-extern void make_decl_rtl              PROTO((tree, char *, int));
-extern void rest_of_decl_compilation   PROTO((tree, char *, int, int));
 
 static tree link_handler_decl;
 static tree handler_link_pointer_type;


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