summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-02 03:13:16 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-02 03:13:16 +0000
commitb144fd49797d694b73d102230d47978d59bb7d97 (patch)
tree9eadea04e4ce16ec29f10e8d7e9ccd268f6f1711 /gcc
parente2fbcc744d225cd1f5698ff5633ebd03b1ef8da3 (diff)
downloadgcc-b144fd49797d694b73d102230d47978d59bb7d97.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29042 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog12
-rw-r--r--gcc/cp/gxx.gperf10
-rw-r--r--gcc/cp/hash.h10
-rw-r--r--gcc/cp/init.c2
-rw-r--r--gcc/cp/lex.c30
5 files changed, 47 insertions, 17 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 1f418a947e1..b6721d4d955 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/gxx.gperf b/gcc/cp/gxx.gperf
index 4c191c542dc..fab533d646e 100644
--- a/gcc/cp/gxx.gperf
+++ b/gcc/cp/gxx.gperf
@@ -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
diff --git a/gcc/cp/hash.h b/gcc/cp/hash.h
index 4d7fac782c9..8518d5ba1dc 100644
--- a/gcc/cp/hash.h
+++ b/gcc/cp/hash.h
@@ -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
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 08eaf0bd86c..3c549fb6b4a 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -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);
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index a67b37d97cc..d5a12bf14b2 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -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;