aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-arc.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2016-05-06 13:59:03 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2016-05-18 22:24:51 +0100
commit38cd8a0de838966a045ddef4ad31c715ef720a42 (patch)
tree11dc246063d8806d029b452457c6264930c63c91 /gas/config/tc-arc.c
parent9e32d9ae97bf54078f993955a7de2f5a9247c497 (diff)
downloadgdb-38cd8a0de838966a045ddef4ad31c715ef720a42.zip
gdb-38cd8a0de838966a045ddef4ad31c715ef720a42.tar.gz
gdb-38cd8a0de838966a045ddef4ad31c715ef720a42.tar.bz2
gas/arc: Make member of arc_flags const
By making the flgp field of struct arc_flags constant we can remove a place where we cast away the const-ness of a variable. Also, given that the value assigned to this field almost always comes from compile-time constant data, having the field non-constant is probably a bad thing. gas/ChangeLog: * config/tc-arc.c (find_opcode_match): Remove casting away of const. * config/tc-arc.h (struct arc_flags): Make flgp field const.
Diffstat (limited to 'gas/config/tc-arc.c')
-rw-r--r--gas/config/tc-arc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c
index 5a5e853..c9d772f 100644
--- a/gas/config/tc-arc.c
+++ b/gas/config/tc-arc.c
@@ -1883,7 +1883,7 @@ find_opcode_match (const struct arc_opcode_hash_entry *entry,
if (pflag->flgp != NULL)
goto match_failed;
cl_matches++;
- pflag->flgp = (struct arc_flag_operand *) flg_operand;
+ pflag->flgp = flg_operand;
lnflg--;
break; /* goto next flag class and parsed flag. */
}