https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77817

--- Comment #15 from Marc Mutz <marc.mutz at kdab dot com> ---
(In reply to Jakub Jelinek from comment #13)
> (In reply to Marc Mutz from comment #12)
> > Is replacing a matching comment with __attribute__(fallthrough)) so
> > complicated as to make this a wontfix?
> 
> It is not really possible.
> __attribute__((fallthrough)) has precise rules on where it can appear, while
> /* FALLTHRU */ comments, being comments, can appear anywhere.  Especially
> with -Wimplicit-fallthrough=1 when all comments are considered fallthru
> comments...

I don't buy this. You don't need to use the 'official' attribute. You can
invent an internal one, say __attribute__((__replaced_fallthrough_comment)),
which does not have the limitations of [[fallthrough]]. It's just a way to
preserve a comment over the preprocessor stage.

Reply via email to