[Bug c/77817] -Wimplicit-fallthrough: cpp directive renders FALLTHRU comment ineffective
marc.mutz at kdab dot com
gcc-bugzilla@gcc.gnu.org
Sun Oct 9 08:52:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77817
Marc Mutz <marc.mutz at kdab dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marc.mutz at kdab dot com
--- Comment #8 from Marc Mutz <marc.mutz at kdab dot com> ---
I see the same in conditional code. Example fix that I applied to Qt locally,
but won't push, because the next compiler will warn that the *comment is
bogus*:
case QVariant::Bool:
return qulonglong(d->data.b);
#ifndef QT_BOOTSTRAPPED
case QMetaType::QJsonValue:
if (!v_cast<QJsonValue>(d)->isDouble())
break;
- // fall through
#endif
+ // fall through
case QVariant::Double:
We have about a dozen of those in QtBase alone, and while Qt 5.8 has a macro
for the attribute, the 5.6 LTS version does not, and still has >2 years of
support ahead of it, so a comment solution would be strongly preferred, and it
would *really* help if this was fixed before this version of the compiler went
into production.
More information about the Gcc-bugs
mailing list