[PATCH][ARM][gas] Fix warnings about uninitialised uses and unused const variables

Kyrill Tkachov kyrylo.tkachov@foss.arm.com
Fri Apr 29 14:38:00 GMT 2016


Hi all,

I recently upgraded my host compiler to GCC 6.1.0 and while trying to build a
cross toolchain for arm-none-eabi I've encountered some -Werror errors in tc-arm.c
This patch fixes them.

Some static const variables that are unused are marked with ATTRIBUTE_UNUSED.
In parse_neon_el_struct_list GCC complains that firsttype.index may be used
uninitialized in an inlined neon_alias_types_same call.
This patch initialises the fields firsttype to prevent that.

With this patch the gas build succeeds for me.
Tested with make check-gas for arm-none-eabi.

Ok to commit?

Thanks,
Kyrill

2016-04-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     * config/tc-arm.c (fpu_arch_vfp_v1): Mark with ATTRIBUTE_UNUSED.
     (fpu_arch_vfp_v3): Likewise.
     (fpu_arch_neon_v1): Likewise.
     (arm_arch_full): Likewise.
     (parse_neon_el_struct_list): Initialize fields of firsttype.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm-gas-warnings.patch
Type: text/x-patch
Size: 2065 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160429/ff3954e9/attachment.bin>


More information about the Gcc-patches mailing list