Commit 37b37199 by Kaveh R. Ghazi Committed by Kaveh Ghazi

tree.c (tree_node_kind_names, [...]): Qualify a char* with the `const' keyword.

        * tree.c (tree_node_kind_names, print_obstack_name,
        get_identifier, maybe_get_identifier, build_string,
        build_expr_wfl, is_attribute_p, lookup_attribute,
        print_obstack_statistics, get_file_function_name_long, tree_check,
        tree_class_check, expr_check): Qualify a char* with the `const'
        keyword.
        * tree.h (get_identifier, maybe_get_identifier, build_string,
        build_expr_wfl, is_attribute_p, lookup_attribute,
        print_obstack_statistics, print_obstack_name, tree_check,
        tree_class_check, expr_check): Likewise.

From-SVN: r25261
parent 7e57923c
Wed Feb 17 10:56:24 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* tree.c (tree_node_kind_names, print_obstack_name,
get_identifier, maybe_get_identifier, build_string,
build_expr_wfl, is_attribute_p, lookup_attribute,
print_obstack_statistics, get_file_function_name_long, tree_check,
tree_class_check, expr_check): Qualify a char* with the `const'
keyword.
* tree.h (get_identifier, maybe_get_identifier, build_string,
build_expr_wfl, is_attribute_p, lookup_attribute,
print_obstack_statistics, print_obstack_name, tree_check,
tree_class_check, expr_check): Likewise.
Tue Feb 16 21:29:38 1999 Jeffrey A Law (law@cygnus.com) Tue Feb 16 21:29:38 1999 Jeffrey A Law (law@cygnus.com)
* i386/freebsd-elf.h, i386/gas.h, i386/linux.h: Fix minor spacing * i386/freebsd-elf.h, i386/gas.h, i386/linux.h: Fix minor spacing
......
...@@ -225,7 +225,7 @@ int tree_node_counts[(int)all_kinds]; ...@@ -225,7 +225,7 @@ int tree_node_counts[(int)all_kinds];
int tree_node_sizes[(int)all_kinds]; int tree_node_sizes[(int)all_kinds];
int id_string_size = 0; int id_string_size = 0;
char *tree_node_kind_names[] = { const char *tree_node_kind_names[] = {
"decls", "decls",
"types", "types",
"blocks", "blocks",
...@@ -743,10 +743,10 @@ void ...@@ -743,10 +743,10 @@ void
print_obstack_name (object, file, prefix) print_obstack_name (object, file, prefix)
char *object; char *object;
FILE *file; FILE *file;
char *prefix; const char *prefix;
{ {
struct obstack *obstack = NULL; struct obstack *obstack = NULL;
char *obstack_name = NULL; const char *obstack_name = NULL;
struct function *p; struct function *p;
for (p = outer_function_chain; p; p = p->next) for (p = outer_function_chain; p; p = p->next)
...@@ -1241,7 +1241,7 @@ copy_list (list) ...@@ -1241,7 +1241,7 @@ copy_list (list)
tree tree
get_identifier (text) get_identifier (text)
register char *text; register const char *text;
{ {
register int hi; register int hi;
register int i; register int i;
...@@ -1304,7 +1304,7 @@ get_identifier (text) ...@@ -1304,7 +1304,7 @@ get_identifier (text)
tree tree
maybe_get_identifier (text) maybe_get_identifier (text)
register char *text; register const char *text;
{ {
register int hi; register int hi;
register int i; register int i;
...@@ -1502,7 +1502,7 @@ build_real_from_int_cst (type, i) ...@@ -1502,7 +1502,7 @@ build_real_from_int_cst (type, i)
tree tree
build_string (len, str) build_string (len, str)
int len; int len;
char *str; const char *str;
{ {
/* Put the string in saveable_obstack since it will be placed in the RTL /* Put the string in saveable_obstack since it will be placed in the RTL
for an "asm" statement and will also be kept around a while if for an "asm" statement and will also be kept around a while if
...@@ -3220,10 +3220,10 @@ build_block (vars, tags, subblocks, supercontext, chain) ...@@ -3220,10 +3220,10 @@ build_block (vars, tags, subblocks, supercontext, chain)
tree tree
build_expr_wfl (node, file, line, col) build_expr_wfl (node, file, line, col)
tree node; tree node;
char *file; const char *file;
int line, col; int line, col;
{ {
static char *last_file = 0; static const char *last_file = 0;
static tree last_filenode = NULL_TREE; static tree last_filenode = NULL_TREE;
register tree wfl = make_node (EXPR_WITH_FILE_LOCATION); register tree wfl = make_node (EXPR_WITH_FILE_LOCATION);
...@@ -3432,7 +3432,7 @@ valid_machine_attribute (attr_name, attr_args, decl, type) ...@@ -3432,7 +3432,7 @@ valid_machine_attribute (attr_name, attr_args, decl, type)
int int
is_attribute_p (attr, ident) is_attribute_p (attr, ident)
char *attr; const char *attr;
tree ident; tree ident;
{ {
int ident_len, attr_len; int ident_len, attr_len;
...@@ -3477,7 +3477,7 @@ is_attribute_p (attr, ident) ...@@ -3477,7 +3477,7 @@ is_attribute_p (attr, ident)
tree tree
lookup_attribute (attr_name, list) lookup_attribute (attr_name, list)
char *attr_name; const char *attr_name;
tree list; tree list;
{ {
tree l; tree l;
...@@ -4730,7 +4730,7 @@ print_inline_obstack_statistics () ...@@ -4730,7 +4730,7 @@ print_inline_obstack_statistics ()
void void
print_obstack_statistics (str, o) print_obstack_statistics (str, o)
char *str; const char *str;
struct obstack *o; struct obstack *o;
{ {
struct _obstack_chunk *chunk = o->chunk; struct _obstack_chunk *chunk = o->chunk;
...@@ -4855,7 +4855,7 @@ append_random_chars (template) ...@@ -4855,7 +4855,7 @@ append_random_chars (template)
tree tree
get_file_function_name_long (type) get_file_function_name_long (type)
char *type; const char *type;
{ {
char *buf; char *buf;
register char *p; register char *p;
...@@ -4867,8 +4867,8 @@ get_file_function_name_long (type) ...@@ -4867,8 +4867,8 @@ get_file_function_name_long (type)
/* We don't have anything that we know to be unique to this translation /* We don't have anything that we know to be unique to this translation
unit, so use what we do have and throw in some randomness. */ unit, so use what we do have and throw in some randomness. */
char *name = weak_global_object_name; const char *name = weak_global_object_name;
char *file = main_input_filename; const char *file = main_input_filename;
if (! name) if (! name)
name = ""; name = "";
...@@ -5038,7 +5038,7 @@ tree ...@@ -5038,7 +5038,7 @@ tree
tree_check (node, code, file, line, nofatal) tree_check (node, code, file, line, nofatal)
tree node; tree node;
enum tree_code code; enum tree_code code;
char *file; const char *file;
int line; int line;
int nofatal; int nofatal;
{ {
...@@ -5058,7 +5058,7 @@ tree ...@@ -5058,7 +5058,7 @@ tree
tree_class_check (node, cl, file, line, nofatal) tree_class_check (node, cl, file, line, nofatal)
tree node; tree node;
char cl; char cl;
char *file; const char *file;
int line; int line;
int nofatal; int nofatal;
{ {
...@@ -5077,7 +5077,7 @@ tree ...@@ -5077,7 +5077,7 @@ tree
expr_check (node, ignored, file, line, nofatal) expr_check (node, ignored, file, line, nofatal)
tree node; tree node;
int ignored; int ignored;
char *file; const char *file;
int line; int line;
int nofatal; int nofatal;
{ {
......
...@@ -1416,13 +1416,13 @@ extern tree make_tree_vec PROTO((int)); ...@@ -1416,13 +1416,13 @@ extern tree make_tree_vec PROTO((int));
/* Return the (unique) IDENTIFIER_NODE node for a given name. /* Return the (unique) IDENTIFIER_NODE node for a given name.
The name is supplied as a char *. */ The name is supplied as a char *. */
extern tree get_identifier PROTO((char *)); extern tree get_identifier PROTO((const char *));
/* If an identifier with the name TEXT (a null-terminated string) has /* If an identifier with the name TEXT (a null-terminated string) has
previously been referred to, return that node; otherwise return previously been referred to, return that node; otherwise return
NULL_TREE. */ NULL_TREE. */
extern tree maybe_get_identifier PROTO((char *)); extern tree maybe_get_identifier PROTO((const char *));
/* Construct various types of nodes. */ /* Construct various types of nodes. */
...@@ -1437,14 +1437,14 @@ extern tree build_int_2_wide PROTO((HOST_WIDE_INT, HOST_WIDE_INT)); ...@@ -1437,14 +1437,14 @@ extern tree build_int_2_wide PROTO((HOST_WIDE_INT, HOST_WIDE_INT));
extern tree build_real PROTO((tree, REAL_VALUE_TYPE)); extern tree build_real PROTO((tree, REAL_VALUE_TYPE));
extern tree build_real_from_int_cst PROTO((tree, tree)); extern tree build_real_from_int_cst PROTO((tree, tree));
extern tree build_complex PROTO((tree, tree, tree)); extern tree build_complex PROTO((tree, tree, tree));
extern tree build_string PROTO((int, char *)); extern tree build_string PROTO((int, const char *));
extern tree build1 PROTO((enum tree_code, tree, tree)); extern tree build1 PROTO((enum tree_code, tree, tree));
extern tree build_tree_list PROTO((tree, tree)); extern tree build_tree_list PROTO((tree, tree));
extern tree build_decl_list PROTO((tree, tree)); extern tree build_decl_list PROTO((tree, tree));
extern tree build_expr_list PROTO((tree, tree)); extern tree build_expr_list PROTO((tree, tree));
extern tree build_decl PROTO((enum tree_code, tree, tree)); extern tree build_decl PROTO((enum tree_code, tree, tree));
extern tree build_block PROTO((tree, tree, tree, tree, tree)); extern tree build_block PROTO((tree, tree, tree, tree, tree));
extern tree build_expr_wfl PROTO((tree, char *, int, int)); extern tree build_expr_wfl PROTO((tree, const char *, int, int));
/* Construct various nodes representing data types. */ /* Construct various nodes representing data types. */
...@@ -1509,12 +1509,12 @@ extern int valid_machine_attribute PROTO((tree, tree, tree, tree)); ...@@ -1509,12 +1509,12 @@ extern int valid_machine_attribute PROTO((tree, tree, tree, tree));
/* Given a tree node and a string, return non-zero if the tree node is /* Given a tree node and a string, return non-zero if the tree node is
a valid attribute name for the string. */ a valid attribute name for the string. */
extern int is_attribute_p PROTO((char *, tree)); extern int is_attribute_p PROTO((const char *, tree));
/* Given an attribute name and a list of attributes, return the list element /* Given an attribute name and a list of attributes, return the list element
of the attribute or NULL_TREE if not found. */ of the attribute or NULL_TREE if not found. */
extern tree lookup_attribute PROTO((char *, tree)); extern tree lookup_attribute PROTO((const char *, tree));
/* Given two attributes lists, return a list of their union. */ /* Given two attributes lists, return a list of their union. */
...@@ -1897,7 +1897,7 @@ extern void (*incomplete_decl_finalize_hook) PROTO((tree)); ...@@ -1897,7 +1897,7 @@ extern void (*incomplete_decl_finalize_hook) PROTO((tree));
/* In tree.c */ /* In tree.c */
extern char *perm_calloc PROTO((int, long)); extern char *perm_calloc PROTO((int, long));
extern tree get_file_function_name PROTO((int)); extern tree get_file_function_name PROTO((int));
extern tree get_file_function_name_long PROTO((char *)); extern tree get_file_function_name_long PROTO((const char *));
extern tree get_set_constructor_bits PROTO((tree, char *, int)); extern tree get_set_constructor_bits PROTO((tree, char *, int));
extern tree get_set_constructor_bytes PROTO((tree, extern tree get_set_constructor_bytes PROTO((tree,
unsigned char *, int)); unsigned char *, int));
...@@ -2153,9 +2153,10 @@ extern void rtl_in_current_obstack PROTO ((void)); ...@@ -2153,9 +2153,10 @@ extern void rtl_in_current_obstack PROTO ((void));
extern void rtl_in_saveable_obstack PROTO ((void)); extern void rtl_in_saveable_obstack PROTO ((void));
extern void init_tree_codes PROTO ((void)); extern void init_tree_codes PROTO ((void));
extern void dump_tree_statistics PROTO ((void)); extern void dump_tree_statistics PROTO ((void));
extern void print_obstack_statistics PROTO ((char *, struct obstack *)); extern void print_obstack_statistics PROTO ((const char *,
struct obstack *));
#ifdef BUFSIZ #ifdef BUFSIZ
extern void print_obstack_name PROTO ((char *, FILE *, char *)); extern void print_obstack_name PROTO ((char *, FILE *, const char *));
#endif #endif
extern void expand_function_end PROTO ((char *, int, int)); extern void expand_function_end PROTO ((char *, int, int));
extern void expand_function_start PROTO ((tree, int)); extern void expand_function_start PROTO ((tree, int));
...@@ -2165,9 +2166,12 @@ extern void start_identifier_warnings PROTO ((void)); ...@@ -2165,9 +2166,12 @@ extern void start_identifier_warnings PROTO ((void));
extern void gcc_obstack_init PROTO ((struct obstack *)); extern void gcc_obstack_init PROTO ((struct obstack *));
extern void init_obstacks PROTO ((void)); extern void init_obstacks PROTO ((void));
extern void obfree PROTO ((char *)); extern void obfree PROTO ((char *));
extern tree tree_check PROTO ((tree, enum tree_code, char*, int, int)); extern tree tree_check PROTO ((tree, enum tree_code,
extern tree tree_class_check PROTO ((tree, char, char*, int, int)); const char *, int, int));
extern tree expr_check PROTO ((tree, int, char*, int, int)); extern tree tree_class_check PROTO ((tree, char, const char *,
int, int));
extern tree expr_check PROTO ((tree, int, const char *,
int, int));
/* In function.c */ /* In function.c */
extern void setjmp_protect_args PROTO ((void)); extern void setjmp_protect_args PROTO ((void));
......
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