Derive-C
Loading...
Searching...
No Matches
zerosized.h File Reference

Go to the source code of this file.

Macros

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

Macro Definition Documentation

◆ DC_ZERO_SIZED

#define DC_ZERO_SIZED ( TYPE)
Value:
typedef struct { \
char zero_sized_arr[0]; \
} TYPE; \
DC_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 11 of file zerosized.h.

11#define DC_ZERO_SIZED(TYPE) \
12 typedef struct { \
13 char zero_sized_arr[0]; \
14 } TYPE; \
15 DC_STATIC_ASSERT(sizeof(TYPE) == 0)