[llvm-dev] -Wswitch-bool?
Max Ruttenberg via llvm-dev
llvm-dev at lists.llvm.org
Tue Mar 29 10:22:06 PDT 2016
Krzysztof,
Thanks for the response.
You're probably using an old clang.
You're right about that. Sadly, I'm stuck with it.
If you can change the source, you could make it "switch ((int)(argc == 2))".
I think that will have to do. Thank you!
-Max
On Tue, Mar 29, 2016 at 12:53 PM, Krzysztof Parzyszek via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> On 3/29/2016 11:44 AM, Max Ruttenberg via llvm-dev wrote:
>
>>
>> I've looked online and saw some post mentioning that this warning is named
>> "switch-bool" but clang doesn't seem to know that.
>>
>
> You're probably using an old clang. There is an option "-Wno-switch-bool"
> that turns this warning off, but if your clang does not understand it,
> there may be no other way of disabling it. Alternatively, you could try -w,
> but that would turn off all warnings.
>
> If you can change the source, you could make it "switch ((int)(argc ==
> 2))".
>
> -Krzysztof
>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
> by The Linux Foundation
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160329/7a84dc9b/attachment.html>
More information about the llvm-dev
mailing list