feat(headers): stddef/stdint/stdbool/limits/float/assert + features wiring
This commit is contained in:
+11
-2
@@ -20,11 +20,15 @@ typedef __SIZE_TYPE__ size_t;
|
||||
/* Signed integer type of the difference of two pointers. */
|
||||
typedef __PTRDIFF_TYPE__ ptrdiff_t;
|
||||
|
||||
/* Wide character type. */
|
||||
/* Wide character type; a C++ keyword there, so no redefinition. */
|
||||
#ifndef __cplusplus
|
||||
typedef __WCHAR_TYPE__ wchar_t;
|
||||
#endif
|
||||
|
||||
/* Type of the null pointer constant nullptr (C23). */
|
||||
/* Type of the null pointer constant nullptr (C23); a C++ keyword there. */
|
||||
#if !defined(__cplusplus) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
|
||||
typedef typeof(nullptr) nullptr_t;
|
||||
#endif
|
||||
|
||||
/* Null pointer constant. */
|
||||
#define NULL ((void *)0)
|
||||
@@ -32,6 +36,11 @@ typedef typeof(nullptr) nullptr_t;
|
||||
/* Offset in bytes of a member from the start of its enclosing object. */
|
||||
#define offsetof(type, m) __builtin_offsetof(type, m)
|
||||
|
||||
/* Mark the following point of the program as unreachable (C23). */
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
|
||||
#define unreachable() __builtin_unreachable()
|
||||
#endif
|
||||
|
||||
/*
|
||||
* An object type whose alignment is as great as that of any supported
|
||||
* fundamental type; suitable as the storage type for aligned allocation.
|
||||
|
||||
Reference in New Issue
Block a user