Patchwork [AArch64/AArch64-4.7] Fix warning - No previous prototype for aarch64_init_simd_builtins.

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

Comments

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

aarch64_init_simd_buitlins is not declared with a prototype, but it
doesn't need one as it should be declared static.

This patch fixes the warning:

config/aarch64/aarch64-builtins.c:314:1: warning: no previous prototype for ‘aarch64_init_simd_builtins’ [-Wmissing-prototypes]

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

config/aarch64/aarch64-builtins.c:313:1: warning: no previous declaration for ‘aarch64_init_simd_builtins’ [-Wmissing-declarations]

On Trunk.

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

OK to apply to trunk and aarch64-4.7-branch?

Thanks,
James Greenhalgh

---
gcc/

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

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

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

Patch

diff --git a/gcc/config/aarch64/aarch64-builtins.c b/gcc/config/aarch64/aarch64-builtins.c
index dfa7b8c..1ea55a8 100644
--- a/gcc/config/aarch64/aarch64-builtins.c
+++ b/gcc/config/aarch64/aarch64-builtins.c
@@ -309,7 +309,7 @@  static GTY(()) tree aarch64_builtin_decls[AARCH64_BUILTIN_MAX];
 #define NUM_DREG_TYPES 6
 #define NUM_QREG_TYPES 6
 
-void
+static void
 aarch64_init_simd_builtins (void)
 {
   unsigned int i, fcode = AARCH64_SIMD_BUILTIN_BASE + 1;