Sorry but true. <br>This is not what, I was looking. <br><br>>char *p ="Hello World\n";<br>>if(p[0] != 'h' || p[0] != 'H')<br>>{<br>> cout << "Word does not start with h/H\n";<br>
>}<br><br>The condition is always true and none of compiler seems to warn them. <br><br><br>--Regards<br>--Deleisha<br><br><br><br><div class="gmail_quote">On Tue, Jun 12, 2012 at 11:30 AM, Devchandra L Meetei <span dir="ltr"><<a href="mailto:dlmeetei@gmail.com" target="_blank">dlmeetei@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks Sean<br>I will have a look at that. <br>Thanks for the pointer<br><br>--Deleisha<div class="HOEnZb"><div class="h5">
<br><br><div class="gmail_quote">On Tue, Jun 12, 2012 at 5:34 AM, Seth Cantrell <span dir="ltr"><<a href="mailto:bames53@gmail.com" target="_blank">bames53@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There's a -Weverything which I think you can use to check to see if a bit of code triggers any warnings.<br>
<div><div><br>
On Jun 11, 2012, at 7:10 AM, Devchandra L Meetei wrote:<br>
<br>
> Hi All<br>
> Does clang support any switch to warn about a conditional eg in if(p* !='h' || p* !='H'), which is always true.<br>
><br>
><br>
> Thankss in reply for timely response<br>
><br>
> Warm Reagrds<br>
> --Dev<br>
</div></div><div><div>> _______________________________________________<br>
> cfe-dev mailing list<br>
> <a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>