aboutsummaryrefslogtreecommitdiff
path: root/bfd/libhppa.h
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2015-10-29 12:55:03 +0000
committerPedro Alves <palves@redhat.com>2015-10-29 12:56:27 +0000
commit968bc5cc86bff4ebf89e63bf99db7c7e777d4756 (patch)
tree36be16481ea3b21704ecfdba6ec7b11d2b4f929f /bfd/libhppa.h
parentd2412fa5d0051f7eb7b13aaf98173b5d9a55d132 (diff)
downloadgdb-968bc5cc86bff4ebf89e63bf99db7c7e777d4756.zip
gdb-968bc5cc86bff4ebf89e63bf99db7c7e777d4756.tar.gz
gdb-968bc5cc86bff4ebf89e63bf99db7c7e777d4756.tar.bz2
bfd/libhppa.h: Make C++ compatible
Fixes this when GDB is built in C++ mode: In file included from /home/pedro/gdb/mygit/src/gdb/../bfd/som.h:27:0, from /home/pedro/gdb/mygit/src/gdb/somread.c:31: /home/pedro/gdb/mygit/src/gdb/../bfd/libhppa.h: In function ‘int bfd_hppa_insn2fmt(bfd*, int)’: /home/pedro/gdb/mygit/src/gdb/../bfd/libhppa.h:380:42: error: invalid conversion from ‘int’ to ‘hppa_opcode_type’ [-fpermissive] #define get_opcode(insn) (((insn) >> 26) & 0x3f) ^ /home/pedro/gdb/mygit/src/gdb/../bfd/libhppa.h:465:30: note: in expansion of macro ‘get_opcode’ enum hppa_opcode_type op = get_opcode (insn); ^ bfd/ChangeLog: 2015-10-29 Pedro Alves <palves@redhat.com> * libhppa.h (bfd_hppa_insn2fmt): Add cast.
Diffstat (limited to 'bfd/libhppa.h')
-rw-r--r--bfd/libhppa.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/libhppa.h b/bfd/libhppa.h
index 9832ccd..4786f35 100644
--- a/bfd/libhppa.h
+++ b/bfd/libhppa.h
@@ -462,7 +462,7 @@ enum hppa_opcode_type
static inline int
bfd_hppa_insn2fmt (bfd *abfd, int insn)
{
- enum hppa_opcode_type op = get_opcode (insn);
+ enum hppa_opcode_type op = (enum hppa_opcode_type) get_opcode (insn);
switch (op)
{