]> gcc.gnu.org Git - gcc.git/commit - gcc/common.opt
invoke.texi (-Wsuggest-attribute=const, [...]): Document.
authorManuel López-Ibáñez <manu@gcc.gnu.org>
Tue, 27 Apr 2010 20:22:54 +0000 (20:22 +0000)
committerManuel López-Ibáñez <manu@gcc.gnu.org>
Tue, 27 Apr 2010 20:22:54 +0000 (20:22 +0000)
commit5dc16b195243d3c9ed970aa1ae62159a9265b2c4
tree778af4c2a789370f37221943c394560c41ac11e2
parentea8b8aa005a994ce5d3e5437c780a35a2c27ff4e
invoke.texi (-Wsuggest-attribute=const, [...]): Document.

2010-04-27  Manuel López-Ibáñez  <manu@gcc.gnu.org>
    Jan Hubicka <hubicka@ucw.cz>

* doc/invoke.texi (-Wsuggest-attribute=const,
-Wsuggest-attribute=pure): Document.
* ipa-pure-const.c: Include toplev.h, intl.h and opts.h.
(function_always_visible_to_compiler_p,
suggest_attribute, warn_function_pure, warn_function_const):
New functions.
(check_call): Improve debug info.
(analyze_function): Do not check availability.
(add_new_function): Check availability.
(propagate): Output warnings.
(skip_function_for_local_pure_const): New function.
(local_pure_const): Use it; output warnings.
* common.opt (Wsuggest-attribute=const,
Wsuggest-attribute=pure): New.

testsuite/
* gcc.dg/pure-2.c: New testcase.
* gcc.dg/const-1.c: New testcase.

Co-Authored-By: Jan Hubicka <hubicka@ucw.cz>
From-SVN: r158803
gcc/ChangeLog
gcc/common.opt
gcc/doc/invoke.texi
gcc/ipa-pure-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/const-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pure-2.c [new file with mode: 0644]
This page took 0.063814 seconds and 5 git commands to generate.