]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/pretty-print.c
re PR tree-optimization/35503 (Warning about restricted pointers?)
authorPrathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
Sun, 13 Nov 2016 19:38:36 +0000 (19:38 +0000)
committerPrathamesh Kulkarni <prathamesh3492@gcc.gnu.org>
Sun, 13 Nov 2016 19:38:36 +0000 (19:38 +0000)
commit975672f3573329b6ef9f687b706c566944a5887f
tree9aad4b4532ab8376d649d4e85993c1dd06279056
parent8d5a1b4f64ed7e4c3712ec1a27c59441e89e5ea9
re PR tree-optimization/35503 (Warning about restricted pointers?)

2016-11-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

PR c/35503
* doc/invoke.texi: Document Wrestrict.
* pretty-print.c (pp_format): Add case for "Z" specifier.
(test_pp_format): Test "Z" specifier.
c-family/
* c-common.h (warn_for_restrict): Declare.
* c-warn.c: Include gcc-rich-location.h.
(warn_for_restrict): New function.
* c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
(gcc_cdiag_char_table): Likewise.
(gcc_cxxdiag_char_table): Likewise.
* c.opt (Wrestrict): New option.
c/
* c-parser.c (c_parser_postfix_expression_after_primary): Call
warn_for_restrict.
cp/
* parser.c (cp_parser_postfix_pexpression): Call warn_for_restrict.
testsuite/
* c-c++-common/pr35503-1.c: New test.
* c-c++-common/pr35503-2.c: Likewise.
* c-c++-common/pr35503-3.c: Likewise.
* gcc.dg/format/gcc_diag-1.c: Add tests for "Z" specifier.

From-SVN: r242366
14 files changed:
gcc/ChangeLog
gcc/c-family/c-common.h
gcc/c-family/c-format.c
gcc/c-family/c-warn.c
gcc/c-family/c.opt
gcc/c/c-parser.c
gcc/cp/parser.c
gcc/doc/invoke.texi
gcc/pretty-print.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/pr35503-1.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/pr35503-2.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/pr35503-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/gcc_diag-1.c