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, cp/method.c warning fixes


	This addresses a bunch of warnings from cp/method.c.

		--Kaveh



Mon Feb 16 16:28:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

        * method.c: Include "system.h" to get stdlib.h, stdio.h,
        ctype.h, string.h, etc.
        (issue_nrepeats): Add default case in enumeration switch.
        (check_btype): Likewise.
        (process_overload_item): Likewise.

        * Makefile.in (method.o): Depend on system.h.


--- gcc/cp/Makefile.in~	Wed Oct  1 13:56:23 1997
+++ gcc/cp/Makefile.in	Tue Feb 17 11:37:15 1998
@@ -244,7 +244,7 @@
 friend.o : friend.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h $(RTL_H)
 init.o : init.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h $(RTL_H) \
   $(srcdir)/../expr.h ../insn-codes.h
-method.o : method.c $(CONFIG_H) $(CXX_TREE_H) class.h
+method.o : method.c $(CONFIG_H) $(CXX_TREE_H) class.h $(srcdir)/../system.h
 cvt.o : cvt.c $(CONFIG_H) $(CXX_TREE_H) class.h
 search.o : search.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../stack.h $(srcdir)/../flags.h
 tree.o : tree.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h
--- gcc/cp/method.c~	Mon Feb 16 16:14:02 1998
+++ gcc/cp/method.c	Mon Feb 16 16:16:11 1998
@@ -31,30 +31,17 @@
 
 /* Handle method declarations.  */
 #include "config.h"
-#include <stdio.h>
+#include "system.h"
 #include "tree.h"
 #include "cp-tree.h"
 #include "class.h"
 #include "obstack.h"
-#include <ctype.h>
 #include "rtl.h"
 #include "expr.h"
 #include "output.h"
 #include "hard-reg-set.h"
 #include "flags.h"
 
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
-#ifdef NEED_DECLARATION_INDEX
-extern char *index ();
-#endif
-
 /* TREE_LIST of the current inline functions that need to be
    processed.  */
 struct pending_inline *pending_inlines;
@@ -447,6 +434,9 @@
             process_overload_item (lasttype, FALSE);
             nrepeats = 0;
             return;
+
+          default:
+            break;
         }
     }
   OB_PUTC ('n');
@@ -1133,6 +1123,9 @@
     case VOID_TYPE:
     case BOOLEAN_TYPE:
       return 0;         /* don't compress single char basic types */
+
+    default:
+      break;
     }
 
   node = TYPE_MAIN_VARIANT (node);
@@ -1201,6 +1194,9 @@
     more:
       build_mangled_name (TREE_TYPE (parmtype), 0, 0);
       return;
+      break;
+
+    default:
       break;
     }
   
--
Kaveh R. Ghazi			Project Manager / Custom Development
ghazi@caip.rutgers.edu		ICon CMT Corp.


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