From 31bebb60e96a3f6425bbb999ce74a075d11aac00 Mon Sep 17 00:00:00 2001 From: Kaveh Ghazi Date: Fri, 6 Mar 1998 07:11:30 +0000 Subject: [PATCH] Warning fix: * 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 | 4 ++-- gcc/cp/method.c | 26 +++++++++++--------------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/gcc/cp/Makefile.in b/gcc/cp/Makefile.in index a6f0f3cd1f6..2ad0858d7b8 100644 --- a/gcc/cp/Makefile.in +++ b/gcc/cp/Makefile.in @@ -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 diff --git a/gcc/cp/method.c b/gcc/cp/method.c index e1ae25072ac..bcb6ea4e6fd 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -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 +#include "system.h #include "tree.h" #include "cp-tree.h" #include "obstack.h" -#include #include "rtl.h" #include "expr.h" #include "output.h" #include "hard-reg-set.h" #include "flags.h" -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#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 */ -- 2.30.2