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] New: warn_unused_result fails to work with member functions


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

            Bug ID: 61229
           Summary: warn_unused_result fails to work with member functions
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: plasmahh at gmx dot net

Since gcc 4.5 (4.4 is fine) the following code will not emit any warning:

struct A 
{
        __attribute__((warn_unused_result)) int callme( ) { return 42; }
};


struct B
{
        void foo( A& a )
        {
            a.callme();
        }
};


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