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
This commit is contained in:
Paolo Carlini 2015-08-12 14:47:58 +00:00 committed by Paolo Carlini
parent 1c6527817f
commit 026af5602f
2 changed files with 13 additions and 0 deletions

View file

@ -1,3 +1,8 @@
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.

View file

@ -0,0 +1,8 @@
// 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" }