https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82435

--- Comment #3 from Arnd Bergmann <arnd at linaro dot org> ---
(In reply to Martin Sebor from comment #1)
> The warning can be selectively suppressed by declaring the alias to have no
> prototype, e.g., like so:
> 
>   int bar (int i) { return 0; }
>   int foo () __attribute__ ((alias ("bar")));

I think this won't work since we rely both prototypes to be just what they are
(yes, this is an ugly area of the kernel)

> In the latest revision of the patch (still under review), the warning is
> controlled by -Wincompatible-pointer-types rather than -Wattributes.
> 
> Is this sufficient?

Maybe we could change the SYSCALL_DEFINEx macro to use _Pragma("GCC diagnostic
push") etc to turn off whichever warning we hit around just the alias
declaration. Having a new warning to turn off globally would be easier though.

Reply via email to