[llvm-commits] Remove warning "adding bool to string".

Sean Silva silvas at purdue.edu
Mon Mar 5 11:32:11 PST 2012


I don't have commit access.

--Sean Silva

On Mon, Mar 5, 2012 at 2:04 PM, Bill Wendling <wendling at apple.com> wrote:

> Wow! The original code is wicked ugly. Your patch seems fine. If you have
> commit access, you can commit it.
>
> -bw
>
> On Mar 4, 2012, at 8:23 AM, Sean Silva <silvas at purdue.edu> wrote:
>
> > The attached patch fixes these two warnings from clang:
> >
> >
> /home/sean/pg/others/llvm/source/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:4506:21:
> warning: adding 'bool' to a string does not append to the string
> [-Wstring-plus-int]
> >     return "_setjmp"+!TLI.usesUnderscoreSetJmp();
> >            ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> /home/sean/pg/others/llvm/source/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:4506:21:
> note: use array indexing to silence this warning
> >     return "_setjmp"+!TLI.usesUnderscoreSetJmp();
> >                     ^
> >            &        [                           ]
> >
> /home/sean/pg/others/llvm/source/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:4508:22:
> warning: adding 'bool' to a string does not append to the string
> [-Wstring-plus-int]
> >     return "_longjmp"+!TLI.usesUnderscoreLongJmp();
> >            ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> /home/sean/pg/others/llvm/source/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:4508:22:
> note: use array indexing to silence this warning
> >     return "_longjmp"+!TLI.usesUnderscoreLongJmp();
> >                      ^
> >            &         [                            ]
> > 2 warnings generated.
> >
> >
> > --Sean Silva
> > <unwarn.patch>_______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120305/a679c5e6/attachment.html>


More information about the llvm-commits mailing list