This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/77817] -Wimplicit-fallthrough: cpp directive renders FALLTHRU comment ineffective
- From: "marc.mutz at kdab dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 09 Oct 2016 07:51:39 +0000
- Subject: [Bug c/77817] -Wimplicit-fallthrough: cpp directive renders FALLTHRU comment ineffective
- Auto-submitted: auto-generated
- References: <bug-77817-4@http.gcc.gnu.org/bugzilla/>
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.