master
 1/* <stddef.h> for the Aro C compiler */
 2
 3#pragma once
 4
 5#define __STDC_VERSION_STDDEF_H__ 202311L
 6
 7typedef __PTRDIFF_TYPE__ ptrdiff_t;
 8typedef __SIZE_TYPE__ size_t;
 9typedef __WCHAR_TYPE__ wchar_t;
10
11/* define max_align_t to match GCC and Clang */
12typedef struct {
13  long long __aro_max_align_ll;
14  long double __aro_max_align_ld;
15} max_align_t;
16
17#define NULL ((void*)0)
18#define offsetof(T, member) __builtin_offsetof(T, member)
19
20#if __STDC_VERSION__ >= 202311L
21#  pragma GCC diagnostic push
22#  pragma GCC diagnostic ignored "-Wpre-c23-compat"
23   typedef typeof(nullptr) nullptr_t;
24#  pragma GCC diagnostic pop
25
26#  if defined unreachable
27#    error unreachable() is a standard macro in C23
28#  else
29#    define unreachable() __builtin_unreachable()
30#  endif
31#endif