Graphviz 13.0.0~dev.20241220.2304
|
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
Go to the source code of this file.
Macros | |
#define | UNREACHABLE() |
#define UNREACHABLE | ( | ) |
Marker for a point in code which execution can never reach.
As a C11 function, this could be thought of as:
_Noreturn void UNREACHABLE(void);
This can be used to explain that a switch is exhaustive:
switch (…) { default: UNREACHABLE(); …remaining cases that cover all possibilities… }
or that a function coda can be omitted:
int foo(void) { while (always_true()) { } UNREACHABLE(); }
Definition at line 30 of file unreachable.h.