This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/11856] unsigned warning in template



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]