[Bug c++/77542] __attribute__((warn_unused_result)) ignored on function template

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Sep 10 21:11:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77542

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2016-09-10
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Do you have a full example which shows the issue?
In your case does ReturnValue  have a copy constructor?
If so this is a dup of bug 38172.  Note C++17 defines [[nodiscard]] which
should be used here instead really but it is only implemented in GCC 7.


More information about the Gcc-bugs mailing list