PR c++/80544 strip cv-quals from cast results
gcc/cp:
PR c++/80544
* tree.c (reshape_init): Use unqualified type for direct enum init.
* typeck.c (maybe_warn_about_cast_ignoring_quals): New.
(build_static_cast_1, build_reinterpret_cast_1): Strip cv-quals from
non-class destination types.
(build_const_cast_1): Strip cv-quals from destination types.
(build_static_cast, build_reinterpret_cast, build_const_cast)
(cp_build_c_cast): Add calls to maybe_warn_about_cast_ignoring_quals.
gcc/testsuite:
PR c++/80544
* g++.dg/expr/cast11.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@248432 138bc75d-0d04-0410-961f-82ee72b054a4