[Bug c++/82790] New: [GCC 5, 6, 7] -Wuseless-cast doesn't detect unnecessary removal of const
eugene.zelenko at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Nov 1 02:14:00 GMT 2017
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 );
}
More information about the Gcc-bugs
mailing list