OSDN Git Service

2010-04-27 Manuel López-Ibáñez <manu@gcc.gnu.org>
authormanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 27 Apr 2010 20:22:54 +0000 (20:22 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 05:36:33 +0000 (14:36 +0900)
commit1139161773f9741e63a0718a131c81f531cded1b
treeb1876e6690672255d98a6da94032d795c18447f6
parent955e980fb2a0054c2784a34f1e249ce212477a33
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158803 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog