aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-ia64.c
diff options
context:
space:
mode:
authorTrevor Saunders <tbsaunde+binutils@tbsaunde.org>2016-02-28 17:21:12 -0500
committerTrevor Saunders <tbsaunde+binutils@tbsaunde.org>2016-03-31 07:27:36 -0400
commite87de5136e9054974b812a362099826fc83e74e9 (patch)
tree0d12510a4039ec058b9708e894d36aa89be9155d /gas/config/tc-ia64.c
parent47990a6ab563dbbd51b8394dd027071cec459d2e (diff)
downloadgdb-e87de5136e9054974b812a362099826fc83e74e9.zip
gdb-e87de5136e9054974b812a362099826fc83e74e9.tar.gz
gdb-e87de5136e9054974b812a362099826fc83e74e9.tar.bz2
work around get_symbol_name () in sparc and ia64
get_symbol_name () returns a char * in a out arg, which means we need to cast to assign a literal to the variable passed to get_symbol_name (). It seems like better APIs than get_symbol_name () could be provided, but that seems like a fair amount of work so just casting seems to be the betterthing to do for now. gas/ChangeLog: 2016-03-31 Trevor Saunders <tbsaunde+binutils@tbsaunde.org> * config/tc-ia64.c (md_assemble): Add temporary variable to pass to get_symbol_name (). * config/tc-sparc.c (s_register): Cast a literal to char * in assignment.
Diffstat (limited to 'gas/config/tc-ia64.c')
-rw-r--r--gas/config/tc-ia64.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c
index 85f6095..a50b61e 100644
--- a/gas/config/tc-ia64.c
+++ b/gas/config/tc-ia64.c
@@ -10667,7 +10667,8 @@ check_dv (struct ia64_opcode *idesc)
void
md_assemble (char *str)
{
- char *saved_input_line_pointer, *mnemonic;
+ char *saved_input_line_pointer, *temp;
+ const char *mnemonic;
const struct pseudo_opcode *pdesc;
struct ia64_opcode *idesc;
unsigned char qp_regno;
@@ -10679,7 +10680,8 @@ md_assemble (char *str)
/* extract the opcode (mnemonic): */
- ch = get_symbol_name (&mnemonic);
+ ch = get_symbol_name (&temp);
+ mnemonic = temp;
pdesc = (struct pseudo_opcode *) hash_find (md.pseudo_hash, mnemonic);
if (pdesc)
{