[cfe-commits] [PATCH] [libcxx] Fix a tautologically false case for 32-bit builds

David Blaikie dblaikie at gmail.com
Thu Dec 27 11:34:54 PST 2012


On Thu, Dec 27, 2012 at 11:15 AM, Saleem Abdulrasool
<compnerd at compnerd.org> wrote:
> On Thu, Dec 27, 2012 at 11:01 AM, Howard Hinnant <hhinnant at apple.com> 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
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list