https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82790
Bug ID: 82790 Summary: [GCC 5, 6, 7] -Wuseless-cast doesn't detect unnecessary removal of const Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: eugene.zelenko at gmail dot com Target Milestone: --- [GCC 5, 6, 7] -Wuseless-cast doesn't detect unnecessary removal of const. For example: static void Function(const char *Parameter) { } static void Caller() { const char *Variable = "String"; Function( const_cast<char *>( Variable ) ); Function( (char *) Variable ); }