On Fri, Jun 22, 2012 at 3:46 AM, Igor Minin <[email protected]> wrote:
> Diagnostic message is correct, may be just unclear. For example of
> unsafeness see the following code:
[...]

Thank you, I understand why the diagnostic is being issued.

> On Wed, Jun 20, 2012 at 10:23 PM, Dmitri Gribenko <[email protected]>
> wrote:
>> On Wed, Jun 20, 2012 at 2:53 AM, Igor Minin <[email protected]>
>> wrote:
>> > Hello.
>> >
>> > The attached patch adds support for a clang -Wcast-qual option. Semantic
>> > is
>> > compatible with the gcc one.
>>
>> Hello Igor,
>>
>> Thank you for working on this!
>>
>> +  char** x = 0;
>> +  const char** y = (const char**)x; // expected-warning {{cast
>> discards qualifiers from pointer target type}}
>>
>> I think the diagnostic message is a bit incorrect in this case.

What I meant by "a bit incorrect" is the fact that qualifiers are
being introduced, not discarded.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <[email protected]>*/

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to