This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/61229] New: warn_unused_result fails to work with member functions
- From: "plasmahh at gmx dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 19 May 2014 12:09:23 +0000
- Subject: [Bug c++/61229] New: warn_unused_result fails to work with member functions
- Auto-submitted: auto-generated
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();
}
};