[cfe-commits] [PATCH] -Wcast-qual
Dmitri Gribenko
gribozavr at gmail.com
Wed Jun 20 11:23:30 PDT 2012
On Wed, Jun 20, 2012 at 2:53 AM, Igor Minin <i.minin.llvm at gmail.com> 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.
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 <gribozavr at gmail.com>*/
More information about the cfe-commits
mailing list