This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/77817] -Wimplicit-fallthrough: cpp directive renders FALLTHRU comment ineffective


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]