[Patch, AArch64] Restructure arm_neon.h vector types' implementation.
James Greenhalgh
james.greenhalgh@arm.com
Tue Jul 8 16:00:00 GMT 2014
I've spotted another couple of issues (inline below) that I see when
trying to bootstrap an AArch64 compiler with this patch applied.
(sorry for any duplicate mails sent and received, my mailer was upset by
some of the characters in the error messages).
Thanks,
James
On Fri, Jun 27, 2014 at 04:32:19PM +0100, Tejas Belagod wrote:
> +#define ENTRY(E, M, Q, G) E,
> +enum aarch64_simd_type
> +{
> +#include "aarch64-simd-builtin-types.def"
> +};
> +#undef ENTRY
>
The final entry in this enum will have a trailing comma, resulting in:
[...]/aarch64-builtins.c:333:28
error: comma at end of enumerator list
#define ENTRY(E, M, Q, G) E,
[...]/aarch64-simd-builtin-types.def:50:3: note: in expansion of macro ENTRY
ENTRY (Float64x2_t, V2DF, none, 13)
<snip>
> static void
> -aarch64_init_simd_builtins (void)
> +aarch64_init_simd_builtin_types (void)
> {
> - unsigned int i, fcode = AARCH64_SIMD_BUILTIN_BASE + 1;
> + int i;
> + int nelts = sizeof (aarch64_simd_types) / sizeof (aarch64_simd_types[0]);
> + tree tdecl;
<snip>
> +
> + for (i = 0; i < nelts; i++)
> + {
> + tree eltype = aarch64_simd_types[i].eltype;
> + enum machine_mode mode = aarch64_simd_types[i].mode;
> + enum aarch64_simd_type type = aarch64_simd_types[i].type;
Type is unused here, resulting in:
[...]/aarch64-builtins.c: In function void aarch64_init_simd_builtin_types():
[...]/aarch64-builtins.c:547:30: error: unused variable
enum aarch64_simd_type type = aarch64_simd_types[i].type;
> +
> + if (aarch64_simd_types[i].itype == NULL)
> + aarch64_simd_types[i].itype =
> + build_distinct_type_copy
> + (build_vector_type (eltype, GET_MODE_NUNITS (mode)));
> +
> + tdecl = add_builtin_type (aarch64_simd_types[i].name,
> + aarch64_simd_types[i].itype);
> + TYPE_NAME (aarch64_simd_types[i].itype) = tdecl;
> + SET_TYPE_STRUCTURAL_EQUALITY (aarch64_simd_types[i].itype);
> + }
>
<snip>
More information about the Gcc-patches
mailing list