summaryrefslogtreecommitdiff
path: root/gcc/treelang
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-27 08:12:35 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-27 08:12:35 +0000
commit3bde545b0fa12361dcdf19a0e987c74f439f0d52 (patch)
tree5fc2f61aad9b67b2bfc28e2c1741d1e689abc993 /gcc/treelang
parent361223260284576c96bd022e66409ae36b5193a6 (diff)
downloadgcc-3bde545b0fa12361dcdf19a0e987c74f439f0d52.tar.gz
* lex.l (update_yylval): Constify.
* treelang.h (struct token_part, struct parameter_part): Likewise. * treetree.c (tree_code_create_function_prototype, tree_code_create_variable, tree_code_get_integer_value): Likewise. * treetree.h (tree_code_get_integer_value, tree_code_create_function_prototype, tree_code_create_variable): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126973 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/treelang')
-rw-r--r--gcc/treelang/ChangeLog12
-rw-r--r--gcc/treelang/lex.l2
-rw-r--r--gcc/treelang/treelang.h4
-rw-r--r--gcc/treelang/treetree.c6
-rw-r--r--gcc/treelang/treetree.h6
5 files changed, 21 insertions, 9 deletions
diff --git a/gcc/treelang/ChangeLog b/gcc/treelang/ChangeLog
index 8e1d769b27f..1e47c32c3e5 100644
--- a/gcc/treelang/ChangeLog
+++ b/gcc/treelang/ChangeLog
@@ -1,3 +1,15 @@
+2007-07-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * lex.l (update_yylval): Constify.
+ * treelang.h (struct token_part, struct parameter_part):
+ Likewise.
+ * treetree.c (tree_code_create_function_prototype,
+ tree_code_create_variable, tree_code_get_integer_value):
+ Likewise.
+ * treetree.h (tree_code_get_integer_value,
+ tree_code_create_function_prototype, tree_code_create_variable):
+ Likewise.
+
2007-07-25 Richard Guenther <rguenther@suse.de>
* treetree.c (tree_code_generate_return): RETURN_EXPRs
diff --git a/gcc/treelang/lex.l b/gcc/treelang/lex.l
index a41cccdd6bf..429ee80fe60 100644
--- a/gcc/treelang/lex.l
+++ b/gcc/treelang/lex.l
@@ -269,7 +269,7 @@ update_yylval (int a)
tok->tp.tok.length = yyleng;
/* Have to copy yytext as it is just a ptr into the buffer at the
moment. */
- tok->tp.tok.chars = (unsigned char*) get_string (yytext, yyleng);
+ tok->tp.tok.chars = (const unsigned char *) get_string (yytext, yyleng);
}
/* Trace the value LEXRET and the position and token details being
diff --git a/gcc/treelang/treelang.h b/gcc/treelang/treelang.h
index ba28cc4514f..aea030a4256 100644
--- a/gcc/treelang/treelang.h
+++ b/gcc/treelang/treelang.h
@@ -53,7 +53,7 @@ struct token_part GTY(())
location_t location;
unsigned int charno;
unsigned int length; /* The value. */
- unsigned char* chars;
+ const unsigned char *chars;
};
/* Definitions for fields in production. */
@@ -119,7 +119,7 @@ struct production_part GTY(())
struct parameter_part GTY(())
{
struct prod_token_parm_item *next; /* Next entry. */
- unsigned char* variable_name; /* Name. */
+ const unsigned char *variable_name; /* Name. */
tree * GTY ((skip)) where_to_put_var_tree; /* Where to save decl. */
};
diff --git a/gcc/treelang/treetree.c b/gcc/treelang/treetree.c
index cbd61d45162..295d882cb29 100644
--- a/gcc/treelang/treetree.c
+++ b/gcc/treelang/treetree.c
@@ -299,7 +299,7 @@ tree_code_if_end (location_t loc ATTRIBUTE_UNUSED)
is PARMS, returns decl for this function. */
tree
-tree_code_create_function_prototype (unsigned char* chars,
+tree_code_create_function_prototype (const unsigned char *chars,
unsigned int storage_class,
unsigned int ret_type,
struct prod_token_parm_item* parms,
@@ -489,7 +489,7 @@ tree_code_create_function_wrapup (location_t loc)
tree
tree_code_create_variable (unsigned int storage_class,
- unsigned char* chars,
+ const unsigned char *chars,
unsigned int length,
unsigned int expression_type,
tree init,
@@ -604,7 +604,7 @@ tree_code_output_expression_statement (tree code, location_t loc)
size checking is done. */
tree
-tree_code_get_integer_value (unsigned char* chars, unsigned int length)
+tree_code_get_integer_value (const unsigned char *chars, unsigned int length)
{
long long int val = 0;
unsigned int ix;
diff --git a/gcc/treelang/treetree.h b/gcc/treelang/treetree.h
index edfb33c03fd..6774626cd91 100644
--- a/gcc/treelang/treetree.h
+++ b/gcc/treelang/treetree.h
@@ -29,7 +29,7 @@
tree tree_code_init_parameters (void);
tree tree_code_add_parameter (tree list, tree proto_exp, tree exp);
-tree tree_code_get_integer_value (unsigned char *chars, unsigned int length);
+tree tree_code_get_integer_value (const unsigned char *chars, unsigned int length);
void tree_code_generate_return (tree type, tree exp);
void tree_ggc_storage_always_used (void *m);
tree tree_code_get_expression (unsigned int exp_type, tree type, tree op1,
@@ -38,13 +38,13 @@ tree tree_code_get_numeric_type (unsigned int size1, unsigned int sign1);
void tree_code_create_function_initial (tree prev_saved,
location_t loc);
void tree_code_create_function_wrapup (location_t loc);
-tree tree_code_create_function_prototype (unsigned char* chars,
+tree tree_code_create_function_prototype (const unsigned char *chars,
unsigned int storage_class,
unsigned int ret_type,
struct prod_token_parm_item* parms,
location_t loc);
tree tree_code_create_variable (unsigned int storage_class,
- unsigned char* chars,
+ const unsigned char *chars,
unsigned int length,
unsigned int expression_type,
tree init,