[PATCH] handle unusual targets in -Wbuiltin-declaration-mismatch (PR 88098)

Christophe Lyon christophe.lyon@linaro.org
Tue Nov 20 15:56:00 GMT 2018


On Mon, 19 Nov 2018 at 22:38, Martin Sebor <msebor@redhat.com> wrote:
>
> The gcc.dg/Wbuiltin-declaration-mismatch-4.c test added with
> the recent -Wbuiltin-declaration-mismatch enhancement to detect
> calls with incompatible arguments to built-ins declared without
> a prototype fails on a few targets due to incorrect assumptions
> hardcoded into the test.  Besides removing those assumptions
> (or adding appropriate { target } attributes, the attached patch
> also adjusts the implementation of the warning to avoid triggering
> for enum promotion to int on short_enums targets.
>
> Since the fix is trivial I plan to commit it tomorrow if there
> are no concerns.
>
> Tested on x86_64-linux and with an arm-none-eabi cross-compiler.
> I also did a little bit of testing with sparc-solaris2.11 cross
> compiler but there the test harness fails due to the -m32 option
> so the Wbuiltin-declaration-mismatch-4.c still has unexpected
> FAILs.  I've raised bug 88104 for the outstanding problem on
> sparc-solaris2.11.
>

Hello,

I tested your patch on arm* and aarch64*. It does the job on arm, but
on aarch64*elf,
I'm seeing new failures:
gcc.dg/Wbuiltin-declaration-mismatch-4.c large long double (test for
warnings, line 121)
gcc.dg/Wbuiltin-declaration-mismatch-4.c large long double (test for
warnings, line 123)
gcc.dg/Wbuiltin-declaration-mismatch-4.c large long double (test for
warnings, line 98)



> Martin



More information about the Gcc-patches mailing list