tree.c (handle_nodiscard_attribute): Do not warn about nodiscard applied to a constru...
authorPaolo Carlini <paolo.carlini@oracle.com>
Fri, 2 Aug 2019 08:52:42 +0000 (08:52 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 2 Aug 2019 08:52:42 +0000 (08:52 +0000)
commitc0cc62604f163289afaa37ba45f729ae31a45e71
tree03ffffd8413791dc78564c7280967cb3393692db
parenta684432bf771bb8b21a9737b50e64d774d9920c9
tree.c (handle_nodiscard_attribute): Do not warn about nodiscard applied to a constructor.

/cp
2019-08-02  Paolo Carlini  <paolo.carlini@oracle.com>

* tree.c (handle_nodiscard_attribute): Do not warn about nodiscard
applied to a constructor.

/testsuite
2019-08-02  Paolo Carlini  <paolo.carlini@oracle.com>

* g++.dg/cpp1z/nodiscard6.C: New.

From-SVN: r274002
gcc/cp/ChangeLog
gcc/cp/tree.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1z/nodiscard6.C [new file with mode: 0644]