<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Have you tested this with volatile at all? Mixing volatile and const? Sometimes in your patch you refer to const only, other times to "more qualified" in general.</div><div><br></div><div>I'm not such a fan of "in an unsafe way"; it implies there is a safe way. (I guess there is if the pointer itself is const.) But I don't have anything better; putting "unsafely" in the middle of the message sounds awkward.</div><div><br></div><div>Jordan</div><div><br></div><br><div><div>On Jun 25, 2012, at 6:28 , Igor Minin <<a href="mailto:i.minin.llvm@gmail.com">i.minin.llvm@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hello!<div>Thanks for review.<div><br></div><div>I fixed the message. Now it has two separate forms:</div><div><br></div><div>* "cast from T1 to T2 discards qualifiers from pointer target type"</div><div>* "cast from T1 to T2 introduces qualifiers to pointer target type in an unsafe way"</div>
<div><br></div><div>Also I did some cosmetic fixes in comments, code etc.</div><div><br></div><div>Please see attached patch.</div><div><br></div><div>Best regards, </div><div>Igor</div><div><br><br><div class="gmail_quote">
On Fri, Jun 22, 2012 at 7:48 PM, Jordan Rose <span dir="ltr"><<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

I think Dmitri was specifically referring to the /message/, not the warning itself:<br>
<div><br>
> +  char** x = 0;<br>
> +  const char** y = (const char**)x; // expected-warning {{cast<br>
> discards qualifiers from pointer target type}}<br>
<br>
</div>Qualifiers are being added, not discarded. Most people won't immediately see why this is a problem, though, so it might be worth being a bit more verbose anyway.<br>
<br>
It's a good warning, thanks for putting it in.<br>
<span><font color="#888888"><br>
Jordan<br>
</font></span></blockquote></div><br>
</div></div>
<span><warn_cast_qual.diff></span></blockquote></div><br></body></html>