Hacker News new | past | comments | ask | show | jobs | submit login

In gcc try -Wcast-qual



It's good to know that it exists (and that it's not included in -Wall -Wextra) but it's not quite what I'm looking for. The cast itself is well defined --- it's the subsequent write that is the issue. While it wouldn't be possible to catch all of these, those that are caught are likely genuine bugs.

That said, it looks like -Wcast-qual is also supported by clang and icc. Clang includes it in "-Weverything", which gcc and icc do not support. Even if not ideal for this issue, I'm sure there are cases where it would help to catch bugs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: