This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 5/6] [AArch64-4.7] Fix warning - Mixed code and declarations in aarch64_simd_const_bounds.

On 01/02/13 17:42, James Greenhalgh wrote:


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?



2013-02-01 James Greenhalgh <>

	* 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);

Blank line after declaration.

OK with that change.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]