nrfxlib API 3.3.99
Loading...
Searching...
No Matches

◆ SWITCH_CASE_FALLTHROUGH

#define SWITCH_CASE_FALLTHROUGH   /* fallthrough */

#include <nrf_802154/common/include/nrf_802154_compiler.h>

Portable fallthrough annotation for switch case statements.

This macro provides a portable way to annotate intentional fallthrough between switch case labels across different C standards and compilers:

  • C23: Uses [[fallthrough]] attribute
  • GCC 7+/Clang: Uses attribute((fallthrough))
  • Older compilers: Falls back to comment-based annotation

Usage:

switch (value) {
case 1:
do_something();
case 2:
do_something_else();
break;
}
#define SWITCH_CASE_FALLTHROUGH
Definition nrf_802154_compiler.h:94