[Bug c++/50956] -Wcast-qual does not work
jason at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 2 12:45:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50956
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011-11-02
Ever Confirmed|0 |1
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2011-11-02 12:45:18 UTC ---
(In reply to comment #1)
> /* Perform a static_cast from EXPR to TYPE. When C_CAST_P is true,
> this static_cast is being attempted as one of the possible casts
> allowed by a C-style cast. (In that case, accessibility of base
> classes is not considered, and it is OK to cast away
> constness.) ...
>
> thus, the behavior seems *definitely* intended.
It's intended that we accept the code ("OK" meaning "well-formed"), but
-Wcast-qual should still warn.
More information about the Gcc-bugs
mailing list