PR c/86125 - missing -Wbuiltin-declaration-mismatch on a mismatched return type
authorMartin Sebor <msebor@redhat.com>
Thu, 24 Jan 2019 21:06:01 +0000 (21:06 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Thu, 24 Jan 2019 21:06:01 +0000 (14:06 -0700)
commitd8b5a1a00d4f88aa82c9119095e2b4993444f6ee
treee7c8ef5adbfbf022494077b361707815ca26de7d
parentb0e0e88526c47e05346469db24d4111b5f43be54
PR c/86125 - missing -Wbuiltin-declaration-mismatch on a mismatched return type

PR c/86125 - missing -Wbuiltin-declaration-mismatch on a mismatched return type
PR middle-end/86308 - ICE in verify_gimple calling index() with an invalid declaration
PR c/86125 - missing -Wbuiltin-declaration-mismatch on a mismatched return type
PR c/88886 - [9 Regression] ice in get_constant, at c-family/c-format.c:292

gcc/c/ChangeLog:

PR c/86125
PR c/88886
PR middle-end/86308
* c-decl.c (match_builtin_function_types): Add arguments.
(diagnose_mismatched_decls): Diagnose mismatched declarations
of built-ins more strictly.

gcc/testsuite/ChangeLog:

PR c/86125
PR c/88886
PR middle-end/86308
* gcc.dg/Wbuiltin-declaration-mismatch-6.c: New test.
* gcc.dg/Wbuiltin-declaration-mismatch-7.c: New test.
* gcc.dg/Wbuiltin-declaration-mismatch-8.c: New test.
* gcc.dg/Wbuiltin-declaration-mismatch-9.c: New test.
* gcc.dg/Wbuiltin-declaration-mismatch-10.c: New test.
* gcc.dg/builtins-69.c: New test.
* gcc.dg/Wint-conversion-2.c: Add expected warning.
* gcc.c-torture/execute/eeprof-1.c: Adjust function signatures.

From-SVN: r268251
gcc/c/ChangeLog
gcc/c/c-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/eeprof-1.c
gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-10.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-6.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-7.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-8.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-9.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Wint-conversion-2.c
gcc/testsuite/gcc.dg/builtins-69.c [new file with mode: 0644]