[Bug c++/46643] warn_unused_result is not enforced if return type is templated
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 24 18:31:00 GMT 2010
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46643
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2010-11-24 18:27:58 UTC ---
It has nothing to do with templates but rather non-PODs:
class foo {
public:
int baz() __attribute__((warn_unused_result));
private:
int a;
};
foo g(void) __attribute__((warn_unused_result));
int main(void) {
foo b;
g();
return 0;
}
More information about the Gcc-bugs
mailing list