[cfe-commits] [PATCH] Implicit fall-through between switch labels

Joe Groff arcata at gmail.com
Sat Apr 21 16:54:38 PDT 2012


On Mon, Apr 16, 2012 at 8:17 AM, Alexander Kornienko <alexfh at google.com> wrote:
> This patch adds diagnostic of unintentional control flow fall-through
> between switch labels. It also provides a way to specifically mark a switch
> label with a c++ 11 attribute [[fallthrough]] to specify an intentional
> fall-through. This also serves as an example of C++ 11 statement attributes,
> and builds upon my recent patch, which introduces support for this language
> feature.

For future-proofing's sake, does the standard provide any guidance for
naming nonstandardized attributes? Should the attribute be named
something like 'clang::fallthrough' instead of just 'fallthrough', in
case a future standard or other implementations provide for a similar
attribute with different behavior?

-Joe




More information about the cfe-commits mailing list