Skip to content
Snippets Groups Projects
  • Roman Tsisyk's avatar
    3ce62ef8
    Add FALLTHROUGH macro · 3ce62ef8
    Roman Tsisyk authored
    The fallthrough attribute with a null statement serves as a fallthrough
    statement. It hints to the compiler that a statement that falls through
    to another case label, or user-defined label in a switch statement is
    intentional and thus the -Wimplicit-fallthrough warning must not trigger.
    The fallthrough attribute may appear at most once in each attribute list,
    and may not be mixed with other attributes. It can only be used in a switch
    statement (the compiler will issue an error otherwise), after a preceding
    statement and before a logically succeeding case label, or user-defined
    label.
    
    https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/
    3ce62ef8
    History
    Add FALLTHROUGH macro
    Roman Tsisyk authored
    The fallthrough attribute with a null statement serves as a fallthrough
    statement. It hints to the compiler that a statement that falls through
    to another case label, or user-defined label in a switch statement is
    intentional and thus the -Wimplicit-fallthrough warning must not trigger.
    The fallthrough attribute may appear at most once in each attribute list,
    and may not be mixed with other attributes. It can only be used in a switch
    statement (the compiler will issue an error otherwise), after a preceding
    statement and before a logically succeeding case label, or user-defined
    label.
    
    https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/