This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/61229] warn_unused_result fails to work with member functions


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

Dennis Lubert <plasmahh at gmx dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |---

--- Comment #2 from Dennis Lubert <plasmahh at gmx dot net> ---
Since someone else pointed out that there is a bug talking about duplicates
already, now how my real code is more like the following. Also note that it
warns when I remove the dtor of evr.

struct evr
{
        ~evr( );
};

struct evd
{
        virtual __attribute__((warn_unused_result)) evr rs( ) = 0;
};


class sd
{
        [[gnu::warn_unused_result]] evr callme( evd& );
};


evr sd::callme( evd& edis )
{
        edis.rs();
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]