gxx.gperf (hash, [...]): Add prototypes.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Thu, 2 Sep 1999 03:13:16 +0000 (03:13 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Thu, 2 Sep 1999 03:13:16 +0000 (03:13 +0000)
* gxx.gperf (hash, is_reserved_word): Add prototypes.

* init.c (build_vec_init): Initialize variable `try_block'.

* lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
Likewise for bzero/memset.
(token_getch, token_put_back): Add static prototypes.  Remove
`inline' from the definitions.
(retrofit_lang_decl): Call memset, not bzero, to avoid casts.

From-SVN: r29042

gcc/cp/ChangeLog
gcc/cp/gxx.gperf
gcc/cp/hash.h
gcc/cp/init.c
gcc/cp/lex.c

index 1f418a947e15e5859c121fcf0d715ad28948ff3a..b6721d4d9559aeebe06265f57bfebdeefd5988aa 100644 (file)
@@ -1,3 +1,15 @@
+1999-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * gxx.gperf (hash, is_reserved_word): Add prototypes.
+
+       * init.c (build_vec_init): Initialize variable `try_block'.
+
+       * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
+       Likewise for bzero/memset.
+       (token_getch, token_put_back): Add static prototypes.  Remove
+       `inline' from the definitions.
+       (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
+
 1999-09-01  Mark Mitchell  <mark@codesourcery.com>
 
        * cp-tree.h (lang_type): Move align into type_flags.
index 4c191c542dc243833b0615fb0576cf4bf380988c..fab533d646e2c8635493a3701844cbfa98eeca59 100644 (file)
@@ -1,7 +1,15 @@
 %{
-/* Command-line: gperf -L KR-C -F ', 0, 0' -p -j1 -g -o -t -N is_reserved_word -k1,4,$,7 gplus.gperf  */
+/* Command-line: gperf -L C -F ', 0, 0' -p -j1 -g -o -t -N is_reserved_word -k1,4,$,7 gplus.gperf  */
 %}
 struct resword { const char *name; short token; enum rid rid;};
+#ifdef __GNUC__
+__inline
+#endif
+static unsigned int hash PARAMS ((const char *, unsigned int));
+#ifdef __GNUC__
+__inline
+#endif
+struct resword *is_reserved_word PARAMS ((const char *, unsigned int));
 %%
 __alignof, ALIGNOF, RID_UNUSED
 __alignof__, ALIGNOF, RID_UNUSED
index 4d7fac782c977ef16eee1a0a9b06b6066056ae6e..8518d5ba1dcc9146636d778f4550c8af730e0238 100644 (file)
@@ -1,7 +1,15 @@
 /* C code produced by gperf version 2.7.1 (19981006 egcs) */
 /* Command-line: gperf -L C -F , 0, 0 -p -j1 -g -o -t -N is_reserved_word -k1,4,7,$ ../../../gcc/cp/gxx.gperf  */
-/* Command-line: gperf -L KR-C -F ', 0, 0' -p -j1 -g -o -t -N is_reserved_word -k1,4,$,7 gplus.gperf  */
+/* Command-line: gperf -L C -F ', 0, 0' -p -j1 -g -o -t -N is_reserved_word -k1,4,$,7 gplus.gperf  */
 struct resword { const char *name; short token; enum rid rid;};
+#ifdef __GNUC__
+__inline
+#endif
+static unsigned int hash PARAMS ((const char *, unsigned int));
+#ifdef __GNUC__
+__inline
+#endif
+struct resword *is_reserved_word PARAMS ((const char *, unsigned int));
 
 #define TOTAL_KEYWORDS 103
 #define MIN_WORD_LENGTH 2
index 08eaf0bd86ccfd8b9f38056cd5751826f6f2d6fd..3c549fb6b4ae6184e4f3df026681d3a2900235a4 100644 (file)
@@ -2765,7 +2765,7 @@ build_vec_init (decl, base, maxindex, init, from_array)
   tree stmt_expr;
   tree compound_stmt;
   int destroy_temps;
-  tree try_block;
+  tree try_block = NULL_TREE;
   int num_initialized_elts = 0;
 
   maxindex = cp_convert (ptrdiff_type_node, maxindex);
index a67b37d97cc1ceed73761ae89f121cfcd587f83f..d5a12bf14b29f42f800989eab81f7a46e4e3071e 100644 (file)
@@ -91,6 +91,8 @@ static int pragma_getc PROTO((void));
 static void pragma_ungetc PROTO((int));
 #endif
 static int read_line_number PROTO((int *));
+static int token_getch PROTO ((void));
+static void token_put_back PROTO ((int));
 
 /* Given a file name X, return the nondirectory portion.
    Keep in mind that X can be computed more than once.  */
@@ -533,20 +535,20 @@ init_parse (filename)
   init_cplus_unsave ();
   init_cplus_expand ();
 
-  bcopy (cplus_tree_code_type,
-        tree_code_type + (int) LAST_AND_UNUSED_TREE_CODE,
-        (int)LAST_CPLUS_TREE_CODE - (int)LAST_AND_UNUSED_TREE_CODE);
-  bcopy ((char *)cplus_tree_code_length,
-        (char *)(tree_code_length + (int) LAST_AND_UNUSED_TREE_CODE),
-        (LAST_CPLUS_TREE_CODE - (int)LAST_AND_UNUSED_TREE_CODE) * sizeof (int));
-  bcopy ((char *)cplus_tree_code_name,
-        (char *)(tree_code_name + (int) LAST_AND_UNUSED_TREE_CODE),
-        (LAST_CPLUS_TREE_CODE - (int)LAST_AND_UNUSED_TREE_CODE) * sizeof (char *));
+  memcpy (tree_code_type + (int) LAST_AND_UNUSED_TREE_CODE,
+         cplus_tree_code_type,
+         (int)LAST_CPLUS_TREE_CODE - (int)LAST_AND_UNUSED_TREE_CODE);
+  memcpy (tree_code_length + (int) LAST_AND_UNUSED_TREE_CODE,
+         cplus_tree_code_length,
+         (LAST_CPLUS_TREE_CODE - (int)LAST_AND_UNUSED_TREE_CODE) * sizeof (int));
+  memcpy (tree_code_name + (int) LAST_AND_UNUSED_TREE_CODE,
+         cplus_tree_code_name,
+         (LAST_CPLUS_TREE_CODE - (int)LAST_AND_UNUSED_TREE_CODE) * sizeof (char *));
 
   opname_tab = (const char **)oballoc ((int)LAST_CPLUS_TREE_CODE * sizeof (char *));
-  bzero ((char *)opname_tab, (int)LAST_CPLUS_TREE_CODE * sizeof (char *));
+  memset (opname_tab, 0, (int)LAST_CPLUS_TREE_CODE * sizeof (char *));
   assignop_tab = (const char **)oballoc ((int)LAST_CPLUS_TREE_CODE * sizeof (char *));
-  bzero ((char *)assignop_tab, (int)LAST_CPLUS_TREE_CODE * sizeof (char *));
+  memset (assignop_tab, 0, (int)LAST_CPLUS_TREE_CODE * sizeof (char *));
 
   ansi_opname[0] = get_identifier ("<invalid operator>");
   for (i = 0; i < (int) LAST_CPLUS_TREE_CODE; i++)
@@ -3459,7 +3461,7 @@ parse_float (data)
    next token, which screws up feed_input.  So just return a null
    character.  */
 
-inline int
+static int
 token_getch ()
 {
 #if USE_CPPLIB
@@ -3469,7 +3471,7 @@ token_getch ()
   return getch ();
 }
 
-inline void
+static void
 token_put_back (ch)
      int ch;
 {
@@ -4781,7 +4783,7 @@ retrofit_lang_decl (t)
   else
     ld = (struct lang_decl *) obstack_alloc (obstack, size);
 
-  bzero (ld, size);
+  memset (ld, 0, size);
 
   DECL_LANG_SPECIFIC (t) = ld;
   LANG_DECL_PERMANENT (ld) = obstack == &permanent_obstack;