Warning fix:
authorKaveh Ghazi <ghazi@gcc.gnu.org>
Fri, 6 Mar 1998 07:11:30 +0000 (07:11 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Fri, 6 Mar 1998 07:11:30 +0000 (07:11 +0000)
        * 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.

From-SVN: r18427

gcc/cp/Makefile.in
gcc/cp/method.c

index a6f0f3cd1f6e8fc4a731b2e5c66a84ce7ad37e3f..2ad0858d7b856ee5846bba9be32583be0b9d012c 100644 (file)
@@ -1,5 +1,5 @@
 # Makefile for GNU C++ compiler.
-#   Copyright (C) 1987, 88, 90-4, 1995 Free Software Foundation, Inc.
+#   Copyright (C) 1987, 88, 90-5, 1998 Free Software Foundation, Inc.
 
 #This file is part of GNU CC.
 
@@ -244,7 +244,7 @@ call.o : call.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h
 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)
+method.o : method.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../system.h
 cvt.o : cvt.c $(CONFIG_H) $(CXX_TREE_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
index e1ae25072acfb1282d3add22762bd7c701c4b16d..bcb6ea4e6fd74d3a172feb4949137c4a1debaebd 100644 (file)
@@ -1,6 +1,6 @@
 /* Handle the hair of processing (but not expanding) inline functions.
    Also manage function and variable name overloading.
-   Copyright (C) 1987, 89, 92-96, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1987, 89, 92-97, 1998 Free Software Foundation, Inc.
    Contributed by Michael Tiemann (tiemann@cygnus.com)
 
    This file is part of GNU CC.
@@ -31,29 +31,16 @@ Boston, MA 02111-1307, USA.  */
 
 /* Handle method declarations.  */
 #include "config.h"
-#include <stdio.h>
+#include "system.h
 #include "tree.h"
 #include "cp-tree.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;
@@ -351,6 +338,9 @@ issue_nrepeats (lasttype)
             process_overload_item (lasttype, FALSE);
             nrepeats = 0;
             return;
+
+          default:
+            break;
         }
     }
   OB_PUTC ('n');
@@ -1088,6 +1078,9 @@ check_btype (node)
     case VOID_TYPE:
     case BOOLEAN_TYPE:
       return 0;         /* don't compress single char basic types */
+
+    default:
+      break;
     }
 
   node = TYPE_MAIN_VARIANT (node);
@@ -1157,6 +1150,9 @@ process_overload_item (parmtype, extra_Gcode)
       build_mangled_name (TREE_TYPE (parmtype), 0, 0);
       return;
       break;
+
+    default:
+      break;
     }
   
   /* check if type is already in the typelist. If not, add it now */