This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15723] Over-eager warning not appropriate in templates
- From: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 May 2004 12:18:42 -0000
- Subject: [Bug c++/15723] Over-eager warning not appropriate in templates
- References: <20040529115448.15723.igodard@pacbell.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From igodard at pacbell dot net 2004-05-29 12:18 -------
p.s. I tried without success to reproduce this warning in a simple template case e.g.:
#include <iostream>
template<typename T>
void Foo(T t) { if (t < 0) std::cout << "foo" << std::endl; }
int main() {
int i; unsigned int ui;
Foo(i);
Foo(ui);
return 0;
}
This suggests that the compiler already omits this warning for templates, and I have hit a bug (rather than a missing feature) in which it is still warning in the case I happened to hit.
Ivan
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15723