[PATCH] don't diagnose -Wchar-subscript for safe char literal

Richard Smith richard at metafoo.co.uk
Wed Apr 16 22:50:35 PDT 2014


Looks like your new test will fail on platforms where plain char is
unsigned. Please make sure the test has an explicit triple to avoid that,
then LGTM.


On Wed, Apr 16, 2014 at 7:10 AM, Daniel Marjamäki <
Daniel.Marjamaki at evidente.se> wrote:

>
>
> Thank you!
>
> > This doesn't look like it's quite enough: if the index's type is Char_S,
> you should also check whether the value of the character literal is
> negative.
>
> I added a testcase for array['\xFF'] also.
>
> There is a array out of bounds message reported then.
>
> Best regards,
> Daniel Marjamäki
>
>
> ..................................................................................................................
> Daniel Marjamäki
> Senior Engineer
> Evidente ES East AB
> Warfvinges väg 34  SE-112 51 Stockholm  Sweden
>
>
> Mobile:
> +46 (0)709 12 42 62
> E-mail:
>
> Daniel.Marjamaki at evidente.se
>
>
> www.evidente.se
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140416/4c14b7e0/attachment.html>


More information about the cfe-commits mailing list