Commit 026af560 by Paolo Carlini Committed by Paolo Carlini

re PR c++/47461 (warn_unused_result attribute ignored for templates)

2015-08-12  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/47461
	* g++.dg/warn/Wunused-result-1.C: New.

From-SVN: r226816
parent 1c652781
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.
......
// 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" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment