------- Comment #10 from gdr at gcc dot gnu dot org 2006-01-23 01:17 -------
> > With this code: > > template <typename t> > > void f(t c) { > > assert(0 <= c and c <= 2); > > } > > int main() { > > f<unsigned char>(5); > > } > > I only get a warning on instantiation. > > > > > > I see, I oversimplified the problem a bit. Here is a better example: > ------------------------------ > #include <cassert> > template <typename Int, Int D> > void f(Int x) { > assert(0 <= x and x <= D); > } This kind of template tends to be common place for certain catgories of codes. It is annoying. This also manifests in gcjx. I don't know which way to go yet, but certainly it should be controlable by -Walways-true. -- gdr at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tromey at gcc dot gnu dot | |org, gdr at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11856