2015-08-12 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/47461
* g++.dg/warn/Wunused-result-1.C: New.
From-SVN: r226816
+2015-08-12 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/47461
+ * g++.dg/warn/Wunused-result-1.C: New.
+
2015-08-12 Richard Biener <rguenther@suse.de>
* gcc.dg/tree-ssa/ssa-fre-47.c: New testcase.
--- /dev/null
+// PR c++/47461
+
+class C {
+ public:
+ template<typename T> bool f(T* m) __attribute__((warn_unused_result));
+};
+template<typename T> inline bool C::f(T* m) { return true; }
+void f(C* pc) { int i; pc->f(&i); } // { dg-warning "ignoring return value" }