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

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

Comments

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

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

This patch fixes the warning:

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

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

config/aarch64/aarch64:5990:1: warning: no previous declaration for ‘const char* aarch64_mangle_type’ [-Wmissing-declarations]

On Trunk.

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

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_mangle_type): Make static.
Marcus Shawcroft - Feb. 28, 2013, 4:23 p.m.
OK

On 28 February 2013 09:36, James Greenhalgh <james.greenhalgh@arm.com> wrote:
>
> Hi,
>
> aarch64_mangle_type has no prototype, but it doesn't need one as
> it should be declared static.
>
> This patch fixes the warning:
>
> config/aarch64/aarch64.c:5974:1: warning: no previous prototype for ‘aarch64_mangle_type’ [-Wmissing-prototypes]
>
> Which is hidden when building with g++, but looks like:
>
> config/aarch64/aarch64:5990:1: warning: no previous declaration for ‘const char* aarch64_mangle_type’ [-Wmissing-declarations]
>
> On Trunk.
>
> Regression tested on aarch64-none-elf with no regressions.
>
> 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_mangle_type): Make static.

Patch

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index f091297..a1e4cdd 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -5986,7 +5986,7 @@  static aarch64_simd_mangle_map_entry aarch64_simd_mangle_map[] = {
 
 /* Implement TARGET_MANGLE_TYPE.  */
 
-const char *
+static const char *
 aarch64_mangle_type (const_tree type)
 {
   /* The AArch64 ABI documents say that "__va_list" has to be