[Bug c++/11856] unsigned warning in template
manu at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Jan 17 00:47:00 GMT 2007
------- Comment #13 from manu at gcc dot gnu dot org 2007-01-17 00:47 -------
#include <cassert>
template <typename Int, Int D>
void f(Int x) {
assert(0 <= x and x <= D);
}
int main() {
f<unsigned char, 2>(5);
f<signed char, 2>(5);
}
We don't emit a warning when instantiated as a signed char, so everything boils
down to having an option to disable the warning, doesn't it?
There is a patch pending review for that:
http://gcc.gnu.org/ml/gcc-patches/2007-01/msg01120.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11856
More information about the Gcc-bugs
mailing list