Discussion:
[PATCH][Binutils][AArch64][committed] Replace C initializers with memset
Tamar Christina
2018-10-08 12:13:34 UTC
Permalink
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 <***@arm.com>

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

--

Loading...