Commit f5984164 by Kaveh R. Ghazi Committed by Kaveh Ghazi

gxx.gperf (hash, [...]): Add prototypes.

	* 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
parent aea87e88
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> 1999-09-01 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (lang_type): Move align into type_flags. * cp-tree.h (lang_type): Move align into type_flags.
......
%{ %{
/* 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;}; 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
__alignof__, ALIGNOF, RID_UNUSED __alignof__, ALIGNOF, RID_UNUSED
......
/* C code produced by gperf version 2.7.1 (19981006 egcs) */ /* 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 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;}; 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 TOTAL_KEYWORDS 103
#define MIN_WORD_LENGTH 2 #define MIN_WORD_LENGTH 2
......
...@@ -2765,7 +2765,7 @@ build_vec_init (decl, base, maxindex, init, from_array) ...@@ -2765,7 +2765,7 @@ build_vec_init (decl, base, maxindex, init, from_array)
tree stmt_expr; tree stmt_expr;
tree compound_stmt; tree compound_stmt;
int destroy_temps; int destroy_temps;
tree try_block; tree try_block = NULL_TREE;
int num_initialized_elts = 0; int num_initialized_elts = 0;
maxindex = cp_convert (ptrdiff_type_node, maxindex); maxindex = cp_convert (ptrdiff_type_node, maxindex);
......
...@@ -91,6 +91,8 @@ static int pragma_getc PROTO((void)); ...@@ -91,6 +91,8 @@ static int pragma_getc PROTO((void));
static void pragma_ungetc PROTO((int)); static void pragma_ungetc PROTO((int));
#endif #endif
static int read_line_number PROTO((int *)); 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. /* Given a file name X, return the nondirectory portion.
Keep in mind that X can be computed more than once. */ Keep in mind that X can be computed more than once. */
...@@ -533,20 +535,20 @@ init_parse (filename) ...@@ -533,20 +535,20 @@ init_parse (filename)
init_cplus_unsave (); init_cplus_unsave ();
init_cplus_expand (); init_cplus_expand ();
bcopy (cplus_tree_code_type, memcpy (tree_code_type + (int) LAST_AND_UNUSED_TREE_CODE,
tree_code_type + (int) LAST_AND_UNUSED_TREE_CODE, cplus_tree_code_type,
(int)LAST_CPLUS_TREE_CODE - (int)LAST_AND_UNUSED_TREE_CODE); (int)LAST_CPLUS_TREE_CODE - (int)LAST_AND_UNUSED_TREE_CODE);
bcopy ((char *)cplus_tree_code_length, memcpy (tree_code_length + (int) LAST_AND_UNUSED_TREE_CODE,
(char *)(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)); (LAST_CPLUS_TREE_CODE - (int)LAST_AND_UNUSED_TREE_CODE) * sizeof (int));
bcopy ((char *)cplus_tree_code_name, memcpy (tree_code_name + (int) LAST_AND_UNUSED_TREE_CODE,
(char *)(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 *)); (LAST_CPLUS_TREE_CODE - (int)LAST_AND_UNUSED_TREE_CODE) * sizeof (char *));
opname_tab = (const char **)oballoc ((int)LAST_CPLUS_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 *)); 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>"); ansi_opname[0] = get_identifier ("<invalid operator>");
for (i = 0; i < (int) LAST_CPLUS_TREE_CODE; i++) for (i = 0; i < (int) LAST_CPLUS_TREE_CODE; i++)
...@@ -3459,7 +3461,7 @@ parse_float (data) ...@@ -3459,7 +3461,7 @@ parse_float (data)
next token, which screws up feed_input. So just return a null next token, which screws up feed_input. So just return a null
character. */ character. */
inline int static int
token_getch () token_getch ()
{ {
#if USE_CPPLIB #if USE_CPPLIB
...@@ -3469,7 +3471,7 @@ token_getch () ...@@ -3469,7 +3471,7 @@ token_getch ()
return getch (); return getch ();
} }
inline void static void
token_put_back (ch) token_put_back (ch)
int ch; int ch;
{ {
...@@ -4781,7 +4783,7 @@ retrofit_lang_decl (t) ...@@ -4781,7 +4783,7 @@ retrofit_lang_decl (t)
else else
ld = (struct lang_decl *) obstack_alloc (obstack, size); ld = (struct lang_decl *) obstack_alloc (obstack, size);
bzero (ld, size); memset (ld, 0, size);
DECL_LANG_SPECIFIC (t) = ld; DECL_LANG_SPECIFIC (t) = ld;
LANG_DECL_PERMANENT (ld) = obstack == &permanent_obstack; LANG_DECL_PERMANENT (ld) = obstack == &permanent_obstack;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment