public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Earnshaw <rearnsha@arm.com>
To: James Greenhalgh <james.greenhalgh@arm.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	 Marcus Shawcroft <Marcus.Shawcroft@arm.com>
Subject: Re: [PATCH 5/6] [AArch64-4.7] Fix warning - Mixed code and declarations in aarch64_simd_const_bounds.
Date: Sat, 02 Feb 2013 14:25:00 -0000	[thread overview]
Message-ID: <510D21D2.1000402@arm.com> (raw)
In-Reply-To: <1359740555-10179-6-git-send-email-james.greenhalgh@arm.com>

On 01/02/13 17:42, James Greenhalgh wrote:
>
> 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  <james.greenhalgh@arm.com>
>
> 	* config/aarch64/aarch64.c
> 	(aarch64_simd_const_bounds): Move declaration of 'lane' above code.
>
>
> 0005-AArch64-4.7-Fix-warning-Mixed-code-and-declarations-.patch
>
>
> 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.

R.


  reply	other threads:[~2013-02-02 14:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-01 17:43 [Patch 0/6][AArch64-4.7] Fix warnings James Greenhalgh
2013-02-01 17:43 ` [PATCH 1/6] [AArch64-4.7] Fix warning - Initialise generic_tunings James Greenhalgh
2013-02-02 14:23   ` Richard Earnshaw
2013-02-01 17:43 ` [PATCH 2/6] [AArch64-4.7] Fix warning - aarch64_add_constant mixed code and declarations James Greenhalgh
2013-02-02 14:24   ` Richard Earnshaw
2013-02-01 17:43 ` [PATCH 3/6] [AArch64-4.7] Fix warning - aarch64_legitimize_reload_address passes the wrong type to push_reload James Greenhalgh
2013-02-02 14:24   ` Richard Earnshaw
2013-02-01 17:44 ` [PATCH 5/6] [AArch64-4.7] Fix warning - Mixed code and declarations in aarch64_simd_const_bounds James Greenhalgh
2013-02-02 14:25   ` Richard Earnshaw [this message]
2013-02-01 17:44 ` [PATCH 6/6] [AArch64-4.7] Backport: Fix warning in aarch64.md James Greenhalgh
2013-02-02 14:25   ` Richard Earnshaw
2013-02-01 17:44 ` [PATCH 4/6] [AArch64-4.7] Fix warning - aarch64_trampoline_init passes the wrong type to emit_library_call James Greenhalgh
2013-02-02 14:24   ` Richard Earnshaw

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=510D21D2.1000402@arm.com \
    --to=rearnsha@arm.com \
    --cc=Marcus.Shawcroft@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=james.greenhalgh@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).