On Thu, Dec 27, 2012 at 11:15 AM, Saleem Abdulrasool <[email protected]> wrote: > On Thu, Dec 27, 2012 at 11:01 AM, Howard Hinnant <[email protected]> wrote: >> Thanks, this is much better. Though I actually had to add a pragma to >> silence the warning. > > You're welcome :-). Yeah, that pragma will only apply to clang (gcc > no longer warned). That is something that I may try to figure out how > to fix (I believe that clang may be overly aggressive about the > checking, ending up checking template specialisation which will not be > instantiated ... but, I could be completely wrong about that).
All the tautological warnings are broken in this way - they are applied to template specializations which means they warn on one specialization of a template even if the warning wouldn't be valid on all specializations (eg: t > 0 where t is of some template type "T" which, in some cases, is unsigned - in the unsigned specialization this would produce a warning). We already have a bug tracking this, I believe (I don't recall which bug, off hand). Essentially we shouldn't be providing these warnings on specializations at all, only on the original template pattern. - David > >> Committed revision 171167. > > Thanks! > > -- > Saleem Abdulrasool > compnerd (at) compnerd (dot) org > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
