[Bug c++/81327] [8 Regression] cast to void* does not suppress -Wclass-memaccess
ville.voutilainen at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Jan 4 21:08:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81327
--- Comment #6 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
As stated in the other comments, this breaks *users* of existing Qt versions.
Any fix would apply to newer versions only. QVector bit-blasts an object of a
type with a virtual table over an object of that same type, so it doesn't
change the value of the vptr. It does a cast to void* to try and tell the
compiler it knows what it's doing. I don't consider it feasible nor palatable
to suggest said users to have to add warning pragmas everywhere they might
include QVector.
As far as the bit-blast goes, I plan to write a standard change proposal to
make it well-defined.
Please don't release GCC 8 without fixing this problem.
More information about the Gcc-bugs
mailing list