summaryrefslogtreecommitdiff
path: root/gcc/config/arm
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/arm')
-rw-r--r--gcc/config/arm/arm.c7
-rw-r--r--gcc/config/arm/pe.c6
2 files changed, 7 insertions, 6 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index c7f223a6b63..fa3d06dcd75 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -15609,8 +15609,8 @@ arm_expand_unop_builtin (enum insn_code icode,
static int
neon_builtin_compare (const void *a, const void *b)
{
- const neon_builtin_datum *key = a;
- const neon_builtin_datum *memb = b;
+ const neon_builtin_datum *const key = (const neon_builtin_datum *) a;
+ const neon_builtin_datum *const memb = (const neon_builtin_datum *) b;
unsigned int soughtcode = key->base_fcode;
if (soughtcode >= memb->base_fcode
@@ -15629,7 +15629,8 @@ locate_neon_builtin_icode (int fcode, neon_itype *itype)
int idx;
key.base_fcode = fcode;
- found = bsearch (&key, &neon_builtin_data[0], ARRAY_SIZE (neon_builtin_data),
+ found = (neon_builtin_datum *)
+ bsearch (&key, &neon_builtin_data[0], ARRAY_SIZE (neon_builtin_data),
sizeof (neon_builtin_data[0]), neon_builtin_compare);
gcc_assert (found);
idx = fcode - (int) found->base_fcode;
diff --git a/gcc/config/arm/pe.c b/gcc/config/arm/pe.c
index 90bc7299386..8b8adff0e14 100644
--- a/gcc/config/arm/pe.c
+++ b/gcc/config/arm/pe.c
@@ -112,7 +112,7 @@ arm_mark_dllexport (tree decl)
else if (arm_dllexport_name_p (oldname))
return; /* already done */
- newname = alloca (strlen (oldname) + 4);
+ newname = XALLOCAVEC (char, strlen (oldname) + 4);
sprintf (newname, "%ce.%s", ARM_PE_FLAG_CHAR, oldname);
/* We pass newname through get_identifier to ensure it has a unique
@@ -178,7 +178,7 @@ arm_mark_dllimport (tree decl)
TREE_PUBLIC (decl) = 1;
}
- newname = alloca (strlen (oldname) + 11);
+ newname = XALLOCAVEC (char, strlen (oldname) + 11);
sprintf (newname, "%ci.__imp_%s", ARM_PE_FLAG_CHAR, oldname);
/* We pass newname through get_identifier to ensure it has a unique
@@ -250,7 +250,7 @@ arm_pe_unique_section (tree decl, int reloc)
else
prefix = ".data$";
len = strlen (name) + strlen (prefix);
- string = alloca (len + 1);
+ string = XALLOCAVEC (char, len + 1);
sprintf (string, "%s%s", prefix, name);
DECL_SECTION_NAME (decl) = build_string (len, string);