From: Ian Lance Taylor Date: Sat, 28 Oct 1995 05:05:46 +0000 (+0000) Subject: * symbols.c (symbol_find_or_make): Change name to be const. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=73255941ff5b5fc8b9e38203ae50775af77bea3a;p=binutils-gdb.git * symbols.c (symbol_find_or_make): Change name to be const. * symbols.h (symbol_find_or_make): Update declaration. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index f67e63b9c42..1f4ca514bcd 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +Sat Oct 28 01:02:05 1995 Ian Lance Taylor + + * symbols.c (symbol_find_or_make): Change name to be const. + * symbols.h (symbol_find_or_make): Update declaration. + Thu Oct 26 19:18:27 1995 Ken Raeburn * doc/as.texinfo (Align): Mention SH. diff --git a/gas/symbols.c b/gas/symbols.c index 3e7b73efee2..a3ece14e2d0 100644 --- a/gas/symbols.c +++ b/gas/symbols.c @@ -375,7 +375,7 @@ symbol_table_insert (symbolP) */ symbolS * symbol_find_or_make (name) - char *name; + const char *name; { register symbolS *symbolP; @@ -752,6 +752,8 @@ resolve_symbol_value (symp) case O_le: case O_ge: case O_gt: + case O_logical_and: + case O_logical_or: resolve_symbol_value (symp->sy_value.X_add_symbol); resolve_symbol_value (symp->sy_value.X_op_symbol); seg_left = S_GET_SEGMENT (symp->sy_value.X_add_symbol); @@ -787,6 +789,8 @@ resolve_symbol_value (symp) case O_le: val = left <= right ? ~ (offsetT) 0 : 0; case O_ge: val = left >= right ? ~ (offsetT) 0 : 0; case O_gt: val = left > right ? ~ (offsetT) 0 : 0; + case O_logical_and: val = left && right; break; + case O_logical_or: val = left || right; break; default: abort (); } S_SET_VALUE (symp, @@ -1543,6 +1547,12 @@ print_expr_1 (file, exp) case O_gt: fprintf (file, "gt"); break; + case O_logical_and: + fprintf (file, "logical_and"); + break; + case O_logical_or: + fprintf (file, "logical_or"); + break; case O_add: indent_level++; fprintf (file, "add\n%*s<", indent_level * 4, ""); diff --git a/gas/symbols.h b/gas/symbols.h index df07dbf8313..29ae6388774 100644 --- a/gas/symbols.h +++ b/gas/symbols.h @@ -36,13 +36,13 @@ extern int symbols_case_sensitive; char *decode_local_label_name PARAMS ((char *s)); symbolS *symbol_find PARAMS ((CONST char *name)); symbolS *symbol_find_base PARAMS ((CONST char *name, int strip_underscore)); -symbolS *symbol_find_or_make PARAMS ((char *name)); +symbolS *symbol_find_or_make PARAMS ((const char *name)); symbolS *symbol_make PARAMS ((CONST char *name)); symbolS *symbol_new PARAMS ((CONST char *name, segT segment, valueT value, fragS * frag)); symbolS *symbol_create PARAMS ((CONST char *name, segT segment, valueT value, fragS * frag)); -symbolS *colon PARAMS ((char *sym_name)); +symbolS *colon PARAMS ((const char *sym_name)); void local_colon PARAMS ((int n)); void symbol_begin PARAMS ((void)); void symbol_table_insert PARAMS ((symbolS * symbolP));