Hi,
aarch64_simd_const_bounds declares `lane' after an assert. This
patch moves the declaration above the assert.
This patch fixes the warning:
config/aarch64/aarch64.c: In function ‘aarch64_simd_const_bounds’:
config/aarch64/aarch64.c:6412:3: warning: ISO C90 forbids mixed declarations
and code [-pedantic]
Regression tested on aarch64-none-elf with no regressions.
OK for aarch64-4.7-branch?
Thanks,
James
---
gcc/
2013-02-01 James Greenhalgh <[email protected]>
* config/aarch64/aarch64.c
(aarch64_simd_const_bounds): Move declaration of 'lane' above code.
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 434ccd7..a3c482b 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -6406,8 +6406,9 @@ aarch64_simd_lane_bounds (rtx operand, HOST_WIDE_INT low, HOST_WIDE_INT high)
void
aarch64_simd_const_bounds (rtx operand, HOST_WIDE_INT low, HOST_WIDE_INT high)
{
+ HOST_WIDE_INT lane;
gcc_assert (GET_CODE (operand) == CONST_INT);
- HOST_WIDE_INT lane = INTVAL (operand);
+ lane = INTVAL (operand);
if (lane < low || lane >= high)
error ("constant out of range");