Patchwork [AArch64/AArch64-4.7] Fix warning - aarch64_simd_make_constant has no prototype.

login
register
mail settings
Submitter James Greenhalgh
Date Feb. 28, 2013, 9:40 a.m.
Message ID <1362044425-7855-1-git-send-email-james.greenhalgh@arm.com>
Download mbox | patch
Permalink /patch/223854/
State New
Headers show

Comments

James Greenhalgh - Feb. 28, 2013, 9:40 a.m.
Hi,

aarch64_simd_make_constant has no prototype, but it doesn't
need one as it should be declared static.

This patch fixes the warning:

config/aarch64/aarch64.c:6574:1: warning: no previous prototype for ‘aarch64_simd_make_constant’ [-Wmissing-prototypes]

Which is hidden when building with g++, but looks like:

config/aarch64/aarch64.c:6590:1: warning: no previous declaration for ‘aarch64_simd_make_constant’ [-Wmissing-declarations]

On Trunk.

Regression tested with no regressions on aarch64-none-elf.

OK for trunk and aarch64-4.7-branch?

Thanks,
James Greenhalgh

---
gcc/

2013-02-28  James Greenhalgh  <james.greenhalgh@arm.com>

	* config/aarch64/aarch64.c
	(aarch64_simd_make_constant): Make static.
Marcus Shawcroft - Feb. 28, 2013, 4:23 p.m.
OK

On 28 February 2013 09:40, James Greenhalgh <james.greenhalgh@arm.com> wrote:
>
> Hi,
>
> aarch64_simd_make_constant has no prototype, but it doesn't
> need one as it should be declared static.
>
> This patch fixes the warning:
>
> config/aarch64/aarch64.c:6574:1: warning: no previous prototype for ‘aarch64_simd_make_constant’ [-Wmissing-prototypes]
>
> Which is hidden when building with g++, but looks like:
>
> config/aarch64/aarch64.c:6590:1: warning: no previous declaration for ‘aarch64_simd_make_constant’ [-Wmissing-declarations]
>
> On Trunk.
>
> Regression tested with no regressions on aarch64-none-elf.
>
> OK for trunk and aarch64-4.7-branch?
>
> Thanks,
> James Greenhalgh
>
> ---
> gcc/
>
> 2013-02-28  James Greenhalgh  <james.greenhalgh@arm.com>
>
>         * config/aarch64/aarch64.c
>         (aarch64_simd_make_constant): Make static.

Patch

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 85668da..f091297 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -6586,7 +6586,7 @@  aarch64_simd_dup_constant (rtx vals)
    constants (for vec_init) or CONST_VECTOR, efficiently into a
    register.  Returns an RTX to copy into the register, or NULL_RTX
    for a PARALLEL that can not be converted into a CONST_VECTOR.  */
-rtx
+static rtx
 aarch64_simd_make_constant (rtx vals)
 {
   enum machine_mode mode = GET_MODE (vals);