r180673 - Silence a silly sign compare warning from GCC.

David Blaikie dblaikie at gmail.com
Sun Apr 28 07:54:30 PDT 2013


On Apr 28, 2013 1:09 AM, "Benjamin Kramer" <benny.kra at googlemail.com> wrote:
>
> Author: d0k
> Date: Sat Apr 27 10:07:53 2013
> New Revision: 180673
>
> URL: http://llvm.org/viewvc/llvm-project?rev=180673&view=rev
> Log:
> Silence a silly sign compare warning from GCC.

What's the warning? That you shouldn't used a signed value for an array
size?

Should we just disable the warning then?

>
> Modified:
>     cfe/trunk/lib/Sema/DeclSpec.cpp
>
> Modified: cfe/trunk/lib/Sema/DeclSpec.cpp
> URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/DeclSpec.cpp?rev=180673&r1=180672&r2=180673&view=diff
>
==============================================================================
> --- cfe/trunk/lib/Sema/DeclSpec.cpp (original)
> +++ cfe/trunk/lib/Sema/DeclSpec.cpp Sat Apr 27 10:07:53 2013
> @@ -847,7 +847,7 @@ void DeclSpec::Finish(DiagnosticsEngine
>         TypeSpecSign != TSS_unspecified ||
>         TypeAltiVecVector || TypeAltiVecPixel || TypeAltiVecBool ||
>         TypeQualifiers)) {
> -    const int NumLocs = 8;
> +    const unsigned NumLocs = 8;
>      SourceLocation ExtraLocs[NumLocs] = {
>        TSWLoc, TSCLoc, TSSLoc, AltiVecLoc,
>        TQ_constLoc, TQ_restrictLoc, TQ_volatileLoc, TQ_atomicLoc
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130428/8224e5bf/attachment.html>


More information about the cfe-commits mailing list