[cfe-commits] [PATCH] -Wcast-qual

Jordan Rose jordan_rose at apple.com
Fri Jun 22 08:48:35 PDT 2012


I think Dmitri was specifically referring to the /message/, not the warning itself:

> +  char** x = 0;
> +  const char** y = (const char**)x; // expected-warning {{cast
> discards qualifiers from pointer target type}}

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.

It's a good warning, thanks for putting it in.

Jordan



More information about the cfe-commits mailing list