> On 3 Oct 2024, at 21:44, Christophe Lyon <christophe.l...@linaro.org> wrote:
> 
> External email: Use caution opening links or attachments
> 
> 
> Add prototypes for __init_cpu_features_resolver and
> __init_cpu_features to avoid warnings due to -Wmissing-prototypes.
> 
>        libgcc/
>        * config/aarch64/cpuinfo.c (__init_cpu_features_resolver): Add
>        prototype.
>        (__init_cpu_features): Likewise.
> ---
> libgcc/config/aarch64/cpuinfo.c | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/libgcc/config/aarch64/cpuinfo.c b/libgcc/config/aarch64/cpuinfo.c
> index 4b94fca8695..c62a7453e8e 100644
> --- a/libgcc/config/aarch64/cpuinfo.c
> +++ b/libgcc/config/aarch64/cpuinfo.c
> @@ -418,6 +418,7 @@ __init_cpu_features_constructor(unsigned long hwcap,
>   setCPUFeature(FEAT_INIT);
> }
> 
> +void __init_cpu_features_resolver(unsigned long, const __ifunc_arg_t *);
> void
> __init_cpu_features_resolver(unsigned long hwcap, const __ifunc_arg_t *arg) {
>   if (__aarch64_cpu_features.features)
> @@ -425,6 +426,7 @@ __init_cpu_features_resolver(unsigned long hwcap, const 
> __ifunc_arg_t *arg) {
>   __init_cpu_features_constructor(hwcap, arg);
> }
> 
> +void __init_cpu_features(void);
> void __attribute__ ((constructor))
> __init_cpu_features(void) {
>   unsigned long hwcap;

I thought the intent of the missing-prototypes warning is to warn about missing 
prototypes in a header file primarily.
Should these prototypes go into gcc/common/config/aarch64/cpuinfo.h instead?
Thanks,
Kyrill

> --
> 2.34.1
> 

Reply via email to