New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-Wcast-qual not implemented #5174
Comments
Hi! Following patch adds support for this warning http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120618/059295.html |
Ping? |
This was (re)implemented in r222568. |
clang-4.0 still does not warn on that. |
Upon further research, it seems that clang's -Wcast-qual does work for C, but unlike gcc's -Wcast-qual, does not do anything in C++. |
Opened https://reviews.llvm.org/D33102 |
D33102 has just re-landed. |
Extended Description
int main(void)
{
const char *x = 0;
char *y = (char *)x;
return 0;
}
gcc -Wcast-qual warns:
test.c:4: warning: cast discards qualifiers from pointer target type
clang warns nothing.
The text was updated successfully, but these errors were encountered: