[PATCH][Binutils][AArch64][committed] Replace C initializers with memset

Tamar Christina tamar.christina@arm.com
Mon Oct 8 12:13:00 GMT 2018


Hi All,

Clang doesn't accept {0} as a valid C struct initializer under their implementation
of -Wmissing-field-initializers.  This makes using C initializers a bit tricky.

Instead I'm changing the code to use memset instead, which at least GCC inlines and
generates the same code for.  This also seems to be the idiom used in binutils for
most targets.

build on native hardware and regtested on
  aarch64-none-elf, aarch64-none-elf (32 bit host),
  aarch64-none-linux-gnu, aarch64-none-linux-gnu (32-bit host)

Cross-compiled and regtested on
  aarch64-none-linux-gnu, aarch64_be-none-linux-gnu

and no issues.

Committed to the binutils master branch under the obvious rule.

Thanks,
Tamar

opcodes/ChangeLog:

2018-10-08  Tamar Christina  <tamar.christina@arm.com>

	* aarch64-opc.c (verify_constraints): Use memset instead of {0}.

-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rb10057.patch
Type: text/x-diff
Size: 714 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20181008/95f756cf/attachment.bin>


More information about the Binutils mailing list