PR c/83559 - -Wsuggest-attribute=const conflicts with -Wattributes warning about...
authorMartin Sebor <msebor@redhat.com>
Wed, 3 Jan 2018 20:43:47 +0000 (20:43 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Wed, 3 Jan 2018 20:43:47 +0000 (13:43 -0700)
commita594cff3b56f22153e50759c9eb4e0dbe54f3388
tree4f749714f4626da6f165eb6211413bf86d5ab660
parenta6fd2cd769c3bb446085e45794fcb22481eed400
PR c/83559 - -Wsuggest-attribute=const conflicts with -Wattributes warning about const attribute on function returning void

gcc/ChangeLog:

PR c/83559
* doc/extend.texi (attribute const): Fix a typo.
* ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
issuing -Wsuggest-attribute for void functions.

gcc/testsuite/ChangeLog:

PR c/83559
* gcc.dg/const-2.c: New test.
* gcc.dg/pure-3.c: New test.

From-SVN: r256188
gcc/ChangeLog
gcc/doc/extend.texi
gcc/ipa-pure-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/const-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pure-3.c [new file with mode: 0644]