public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* kvx: workaround gcc-4.5 bug
@ 2023-08-24  6:23 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2023-08-24  6:23 UTC (permalink / raw)
  To: binutils

kvx-dis.c:1078:10: error: missing initializer
kvx-dis.c:1078:10: error: (near initialization for 'dec.nb_ops')

	* kvx-dis.c (print_insn_kvx): Init dec with memset.
	(decode_prologue_epilogue_bundle): Likewise.

diff --git a/opcodes/kvx-dis.c b/opcodes/kvx-dis.c
index e63430a9e57..7fef4c7543d 100644
--- a/opcodes/kvx-dis.c
+++ b/opcodes/kvx-dis.c
@@ -1075,7 +1075,8 @@ print_insn_kvx (bfd_vma memaddr, struct disassemble_info *info)
 
   /* Check for extension to right iff this is not the end of bundle.  */
 
-  struct decoded_insn dec = { 0 };
+  struct decoded_insn dec;
+  memset (&dec, 0, sizeof dec);
   if (!invalid_bundle && (found = decode_insn (memaddr, insn, &dec)))
     {
       int ch;
@@ -1248,7 +1249,8 @@ decode_prologue_epilogue_bundle (bfd_vma memaddr,
       insn_t *insn = &bundle_insn[idx_insn];
       int is_add = 0, is_get = 0, is_a_peb_insn = 0, is_copyd = 0;
 
-      struct decoded_insn dec = { 0 };
+      struct decoded_insn dec;
+      memset (&dec, 0, sizeof dec);
       if (!decode_insn (memaddr, insn, &dec))
 	continue;
 

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-24  6:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-24  6:23 kvx: workaround gcc-4.5 bug Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).