]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/c/ChangeLog
re PR c++/79588 (ICE in warn_for_restrict with -Wrestrict)
authorJakub Jelinek <jakub@redhat.com>
Fri, 24 Feb 2017 20:41:54 +0000 (21:41 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 24 Feb 2017 20:41:54 +0000 (21:41 +0100)
commit4227c9adf01d5ada5eb7c868aa104167c2a01983
tree29e5c16f08052689b4d790b7167660e37137ba27
parent5713d448534698c8ac23aa52f015b2c88185cb40
re PR c++/79588 (ICE in warn_for_restrict with -Wrestrict)

PR c++/79588
c-family/
* c-common.c (check_function_restrict): New function.
(check_function_arguments): Add FNDECL argument.  Call
check_function_restrict if -Wrestrict.
* c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
and NARGS.  Use auto_vec for ARG_POSITIONS, simplify.
* c-common.h (check_function_arguments): Add FNDECL argument.
(warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
c/
* c-parser.c (c_parser_postfix_expression_after_primary): Don't
handle -Wrestrict here.
* c-typeck.c (build_function_call_vec): Adjust
check_function_arguments caller.
cp/
* call.c (build_over_call): Call check_function_arguments even for
-Wrestrict, adjust check_function_arguments caller.
* parser.c (cp_parser_postfix_expression): Don't handle -Wrestrict
here.
* typeck.c (cp_build_function_call_vec): Adjust
check_function_arguments caller.
testsuite/
* g++.dg/warn/Wrestrict-1.C: New test.
* g++.dg/warn/Wrestrict-2.C: New test.

From-SVN: r245719
14 files changed:
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/c-family/c-common.h
gcc/c-family/c-warn.c
gcc/c/ChangeLog
gcc/c/c-parser.c
gcc/c/c-typeck.c
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/parser.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wrestrict-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/Wrestrict-2.C [new file with mode: 0644]