This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/80896] [[nodiscard]] is ignored for functions returning references
- From: "paolo at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 01 Jun 2017 10:20:59 +0000
- Subject: [Bug c++/80896] [[nodiscard]] is ignored for functions returning references
- Auto-submitted: auto-generated
- References: <bug-80896-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80896
--- Comment #2 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Thu Jun 1 10:20:27 2017
New Revision: 248784
URL: https://gcc.gnu.org/viewcvs?rev=248784&root=gcc&view=rev
Log:
/cp
2017-06-01 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/80896
* cvt.c (convert_to_void): Possibly call maybe_warn_nodiscard
for case INDIRECT_REF too in the main switch.
/testsuite
2017-06-01 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/80896
* g++.dg/cpp1z/nodiscard5.C: New.
Added:
trunk/gcc/testsuite/g++.dg/cpp1z/nodiscard5.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cvt.c
trunk/gcc/testsuite/ChangeLog