---
name: "SDL_FALLTHROUGH"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_FALLTHROUGH"
---

# SDL\_FALLTHROUGH(3)

A macro to signal that a case statement without a break is intentional.

## NAME

SDL\_FALLTHROUGH - A macro to signal that a case statement without a **break** is intentional.

## HEADER FILE

Defined in SDL3/SDL\_begin\_code.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**#define SDL\_FALLTHROUGH \[\[fallthrough\]\]**

## DESCRIPTION

C compilers have gotten more aggressive about warning when a switch's **case** block does not end with a **break** or other flow control statement, flowing into the next case's code, as this is a common accident that leads to strange bugs. But sometimes falling through to the next case is the correct and desired behavior. This symbol lets an app communicate this intention to the compiler, so it doesn't generate a warning.

It is used like this:

-

  ```
  switch (x) {
      case 1:
          DoSomethingOnlyForOne();
          SDL_FALLTHROUGH;  // tell the compiler this was intentional.
      case 2:
          DoSomethingForOneAndTwo();
          break;
  }
  ```

## AVAILABILITY

This macro is available since SDL 3.2.0.
