Derive-C
Loading...
Searching...
No Matches
zerosized.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ZERO_SIZED(TYPE)
 Zero sized types are useful as markers (e.g. for gdb printing, or to replace debug info structs.

Macro Definition Documentation

◆ ZERO_SIZED

#define ZERO_SIZED ( TYPE)
Value:
typedef struct { \
char zero_sized_marker[0]; \
} TYPE; \
_Static_assert(sizeof(TYPE) == 0)

Zero sized types are useful as markers (e.g. for gdb printing, or to replace debug info structs.

Definition at line 15 of file zerosized.h.

15 #define ZERO_SIZED(TYPE) \
16 typedef struct { \
17 char zero_sized_marker[0]; \
18 } TYPE; \
19 _Static_assert(sizeof(TYPE) == 0)