From 9fcedcc39153cb3cfa08ebab20aef6cdfb9ed609 Mon Sep 17 00:00:00 2001 From: Christophe Lyon Date: Fri, 11 Sep 2020 11:43:56 +0000 Subject: [PATCH] libgcc/config/arm/fp16.c: Make _internal functions static inline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch makes the *_internal functions 'static inline' to avoid these warnings during the build: /libgcc/config/arm/fp16.c:169:1: warning: no previous prototype for '__gnu_h2f_internal' [-Wmissing-prototypes] /libgcc/config/arm/fp16.c:194:1: warning: no previous prototype for '__gnu_f2h_ieee' [-Wmissing-prototypes] /libgcc/config/arm/fp16.c:200:1: warning: no previous prototype for '__gnu_h2f_ieee' [-Wmissing-prototypes] /libgcc/config/arm/fp16.c:206:1: warning: no previous prototype for '__gnu_f2h_alternative' [-Wmissing-prototypes] /libgcc/config/arm/fp16.c:212:1: warning: no previous prototype for '__gnu_h2f_alternative' [-Wmissing-prototypes] /libgcc/config/arm/fp16.c:218:1: warning: no previous prototype for '__gnu_d2h_ieee' [-Wmissing-prototypes] /libgcc/config/arm/fp16.c:224:1: warning: no previous prototype for '__gnu_d2h_alternative' [-Wmissing-prototypes] 2020-09-11 Torbjörn SVENSSON Christophe Lyon libgcc/ * config/arm/fp16.c (__gnu_h2f_internal): Add 'static inline' qualifier. (__gnu_f2h_ieee, __gnu_h2f_ieee, __gnu_f2h_alternative) (__gnu_h2f_alternative,__gnu_d2h_ieee, __gnu_d2h_alternative): Add missing prototypes. --- libgcc/config/arm/fp16.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libgcc/config/arm/fp16.c b/libgcc/config/arm/fp16.c index e8f7afbb528..36645036ff4 100644 --- a/libgcc/config/arm/fp16.c +++ b/libgcc/config/arm/fp16.c @@ -52,6 +52,14 @@ binary64 = 52 /* significand. */ }; +/* Function prototypes. */ +unsigned short __gnu_f2h_ieee (unsigned int a); +unsigned int __gnu_h2f_ieee (unsigned short a); +unsigned short __gnu_f2h_alternative (unsigned int x); +unsigned int __gnu_h2f_alternative (unsigned short a); +unsigned short __gnu_d2h_ieee (unsigned long long a); +unsigned short __gnu_d2h_alternative (unsigned long long x); + static inline unsigned short __gnu_float2h_internal (const struct format* fmt, unsigned long long a, int ieee) @@ -165,7 +173,7 @@ __gnu_d2h_internal (unsigned long long a, int ieee) return __gnu_float2h_internal (&binary64, a, ieee); } -unsigned int +static inline unsigned int __gnu_h2f_internal(unsigned short a, int ieee) { unsigned int sign = (unsigned int)(a & 0x8000) << 16;