eĿlipsis
a language independent preprocessor
 
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Loading...
Searching...
No Matches
ellipsis-init.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <limits.h>
#include <errno.h>
#include "utils/ellipsis-error.h"
#include "utils/ellipsis-malloc.h"
Include dependency graph for ellipsis-init.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ALLOC_CHECK_RETURN(T, M)    case ellipsis‿init‿flex_ ## T: return (len <= M ## _MAX)
 
#define ellipsis_alloc(L, ...)   ELLIPSIS_ALLOC_Iplus ((L) __VA_OPT__(,) __VA_ARGS__)
 
#define ellipsis_alloc_flex(L, T, FL, LEN, ...)
 
#define ELLIPSIS_ALLOC_I(L)   ELLIPSIS_ALLOC_IIplus (L, void)
 
#define ELLIPSIS_ALLOC_IIplus(L, T, ...)
 
#define ELLIPSIS_ALLOC_Iplus(L, ...)   ELLIPSIS_ALLOC_I ## __VA_OPT__(Iplus) (L __VA_OPT__(,) __VA_ARGS__)
 
#define ELLIPSIS_CONTRACT(COUNT, COND, ACTION, VERB, CSTR, CTYPE, ...)
 
#define ELLIPSIS_CONTRACT_CHECK_STATIC(CTYPE, COND, CSTR, ...)
 
#define ELLIPSIS_CONTRACT_ICE_OR_TRUE(...)
 
#define ELLIPSIS_CONTRACT_IMPL(COUNT, COND, ACTION, VERB, CSTR, CTYPE, ...)
 
#define ELLIPSIS_CONTRACT_VIOLATION(COUNT, VERB, CTYPE, CSTR, ...)
 
#define ellipsis_init(L, P, ...)   ELLIPSIS_INIT_IIplus((L), (P) __VA_OPT__(,) __VA_ARGS__)
 
#define ELLIPSIS_INIT_DEFAULT   0
 
#define ellipsis_init_flex(L, P, T, FL, LEN, ...)
 
#define ELLIPSIS_INIT_FLEX_TYPE(...)
 
#define ELLIPSIS_INIT_II(L, P)   ELLIPSIS_INIT_IIIIplus (L, P, void, ELLIPSIS_INIT_DEFAULT)
 
#define ELLIPSIS_INIT_III(L, P, T)   ELLIPSIS_INIT_IIIIplus (L, P, T, ELLIPSIS_INIT_DEFAULT)
 
#define ELLIPSIS_INIT_IIIIplus(L, P, T, ...)
 
#define ELLIPSIS_INIT_IIIplus(L, P, T, ...)   ELLIPSIS_INIT_III ## __VA_OPT__(Iplus)(L, P, T __VA_OPT__(,) __VA_ARGS__)
 
#define ELLIPSIS_INIT_IIplus(L, P, ...)   ELLIPSIS_INIT_II ## __VA_OPT__(Iplus)(L, P __VA_OPT__(,) __VA_ARGS__)
 
#define ELLIPSIS_INIT_OBFUSCATE(X)   ((typeof(X)restrict const){ellipsis‿init‿obfuscate(X), })
 
#define ELLIPSIS_INIT_WHEN_SIGNED(X, A, B)
 
#define ellipsis_realloc_flex(L, P, FL, LEN)
 
#define ELLIPSIS_TEST_ICE(...)   (false ? ELLIPSIS_TO_VOIDS(__VA_ARGS__) : (ellipsis‿contracts‿is_ice*)nullptr)
 
#define ELLIPSIS_TO_VOIDS(...)   ((void*)((uintptr_t)((__VA_ARGS__)-(__VA_ARGS__))))
 
#define STRINGIFY(...)   STRINGIFY_(__VA_ARGS__)
 
#define STRINGIFY_(...)   #__VA_ARGS__
 
#define TARGET_SIZE(T)
 
#define TARGET_TYPE(T)
 

Typedefs

typedef struct ellipsis‿contracts‿is_ice ellipsis‿contracts‿is_ice
 
typedef enum ellipsis‿init‿flex ellipsis‿init‿flex
 

Enumerations

enum  ellipsis‿init‿flex {
  ellipsis‿init‿flex_char , ellipsis‿init‿flex_schar , ellipsis‿init‿flex_uchar , ellipsis‿init‿flex_short ,
  ellipsis‿init‿flex_ushort , ellipsis‿init‿flex_signed , ellipsis‿init‿flex_unsigned , ellipsis‿init‿flex_long ,
  ellipsis‿init‿flex_ulong , ellipsis‿init‿flex_llong , ellipsis‿init‿flex_ullong
}
 

Functions

void * ellipsis‿alloc‿flex_core_s‿_Ctra (signed long long len, size_t size_base, ellipsis‿init‿flex type, size_t off_len, size_t size_dat, size_t off_dat, unsigned char const base_init[restrict static 1], unsigned char const dat_init[restrict static 1])
 
void * ellipsis‿alloc‿flex_core_s (signed long long len, size_t size_base, ellipsis‿init‿flex type, size_t off_len, size_t size_dat, size_t off_dat, unsigned char const base_init[restrict static 1], unsigned char const dat_init[restrict static 1])
 
void * ellipsis‿alloc‿flex_core_u‿_Ctra (unsigned long long len, size_t size_base, ellipsis‿init‿flex type, size_t off_len, size_t size_dat, size_t off_dat, unsigned char const base_init[restrict static 1], unsigned char const dat_init[restrict static 1])
 
void * ellipsis‿alloc‿flex_core_u (unsigned long long len, size_t size_base, ellipsis‿init‿flex type, size_t off_len, size_t size_dat, size_t off_dat, unsigned char const base_init[restrict static 1], unsigned char const dat_init[restrict static 1])
 
bool ellipsis‿init‿check_range (size_t len, size_t size_dat, size_t off_dat)
 
bool ellipsis‿init‿check_type (ellipsis‿init‿flex type, size_t len)
 
void * ellipsis‿init‿flex_core_s‿_Ctra (signed long long len, size_t size_base, ellipsis‿init‿flex type, size_t off_len, size_t size_dat, size_t off_dat, unsigned char ret[restrict static(off_dat+len *size_dat)], unsigned char const base_init[restrict static 1], unsigned char const dat_init[restrict static 1])
 
void * ellipsis‿init‿flex_core_s (signed long long len, size_t size_base, ellipsis‿init‿flex type, size_t off_len, size_t size_dat, size_t off_dat, unsigned char ret[restrict static(off_dat+len *size_dat)], unsigned char const base_init[restrict static 1], unsigned char const dat_init[restrict static 1])
 
void * ellipsis‿init‿flex_core_u‿_Ctra (unsigned long long len, size_t size_base, ellipsis‿init‿flex type, size_t off_len, size_t size_dat, size_t off_dat, unsigned char ret[restrict static(off_dat+len *size_dat)], unsigned char const base_init[restrict static 1], unsigned char const dat_init[restrict static 1])
 
void * ellipsis‿init‿flex_core_u (unsigned long long len, size_t size_base, ellipsis‿init‿flex type, size_t off_len, size_t size_dat, size_t off_dat, unsigned char ret[restrict static(off_dat+len *size_dat)], unsigned char const base_init[restrict static 1], unsigned char const dat_init[restrict static 1])
 
void * ellipsis‿init‿obfuscate (void *p)
 
void ellipsis‿init‿repeat‿_Ctra (size_t n, unsigned char const sample[restrict static n], size_t m, unsigned char buffer[restrict static m])
 
void ellipsis‿init‿repeat (size_t n, unsigned char const sample[restrict static n], size_t m, unsigned char buffer[restrict static m])
 
void * ellipsis‿realloc‿flex_core_s‿_Ctra (signed long long len, void *ostart_, size_t size_base, ellipsis‿init‿flex type, size_t off_len, size_t size_dat, size_t off_dat, unsigned char const ini[restrict static 1])
 
void * ellipsis‿realloc‿flex_core_s (signed long long len, void *ostart_, size_t size_base, ellipsis‿init‿flex type, size_t off_len, size_t size_dat, size_t off_dat, unsigned char const ini[restrict static 1])
 
void * ellipsis‿realloc‿flex_core_u‿_Ctra (unsigned long long len, void *ostart_, size_t size_base, ellipsis‿init‿flex type, size_t off_len, size_t size_dat, size_t off_dat, unsigned char const ini[restrict static 1])
 
void * ellipsis‿realloc‿flex_core_u (unsigned long long len, void *ostart_, size_t size_base, ellipsis‿init‿flex type, size_t off_len, size_t size_dat, size_t off_dat, unsigned char const ini[restrict static 1])
 

Variables

thread_local bool volatile ellipsis‿contracts‿ignore‿dynamic
 
thread_local bool volatile ellipsis‿contracts‿proceed‿dynamic
 
thread_local bool volatile ellipsis‿contracts‿verbose‿dynamic
 

Detailed Description

This implements initialization of arrays and structures with flexible array members as has been proposed in

Jens Gustedt, Martin Uecker: Initialization, allocation and effective type

Warning
This is a file generated by eĿlipsis version 20250309, do not modify

Macro Definition Documentation

◆ ALLOC_CHECK_RETURN

#define ALLOC_CHECK_RETURN (   T,
 
)     case ellipsis‿init‿flex_ ## T: return (len <= M ## _MAX)

◆ ellipsis_alloc

#define ellipsis_alloc (   L,
  ... 
)    ELLIPSIS_ALLOC_Iplus ((L) __VA_OPT__(,) __VA_ARGS__)

Allocate a target array with a base type as indicated by T. T can be a typename of a pointer type or a pointer value. In most cases, the array has the same type unless the pointer is a void pointer in which case the array has base type unsigned char.

ellipsis_alloc(L, T, INIT) -> ELLIPSIS_ALLOC_Iplus((L), T, INIT) -> ELLIPSIS_ALLOC_IIplus((L), T, INIT)
#define ELLIPSIS_ALLOC_IIplus(L, T,...)
Definition ellipsis-init.h:832
#define ellipsis_alloc(L,...)
Definition ellipsis-init.h:816
#define ELLIPSIS_ALLOC_Iplus(L,...)
Definition ellipsis-init.h:821
#define ELLIPSIS_ALLOC_I(L)
Definition ellipsis-init.h:825

at least one argument must be provided

◆ ellipsis_alloc_flex

#define ellipsis_alloc_flex (   L,
  T,
  FL,
  LEN,
  ... 
)
Value:
((typeof(T)*restrict const){\
(L, sizeof(T), \
ELLIPSIS_INIT_FLEX_TYPE(((typeof(T)*)nullptr)->LEN), offsetof(typeof(T), LEN), \
sizeof(((typeof(T)*)nullptr)->FL[0]), offsetof(typeof(T), FL), \
(void const*)&((typeof(T)){__VA_ARGS__ }), \
(void const*)&((typeof(((typeof(T)*)nullptr)->FL[0])){})), })
ellipsis‿alloc‿flex_core_s ellipsis‿alloc‿flex_core_s
Definition ellipsis-init.c:82
ellipsis‿alloc‿flex_core_u ellipsis‿alloc‿flex_core_u
Definition ellipsis-init.c:81
#define ELLIPSIS_INIT_FLEX_TYPE(...)
Definition ellipsis-init.h:918

◆ ELLIPSIS_ALLOC_I

#define ELLIPSIS_ALLOC_I (   L)    ELLIPSIS_ALLOC_IIplus (L, void)

◆ ELLIPSIS_ALLOC_IIplus

#define ELLIPSIS_ALLOC_IIplus (   L,
  T,
  ... 
)
Value:
({\
/* captures */ \
auto const __LOC_ID_1_2 = L;\
typeof(T)*restrict __LOC_ID_1_3 = nullptr;\
/* code */ \
auto const __LOC_ID_1_4 = TARGET_TYPE(__LOC_ID_1_3);\
typedef typeof(*__LOC_ID_1_4) __LOC_ID_1_5;\
ELLIPSIS_CONTRACT(65, 0 < __LOC_ID_1_2 && __LOC_ID_1_2 <= SIZE_MAX, abort, true, "0 < __LOC(3) ∧ __LOC(3) ≤ SIZE_MAX" , "assertion","the requested length overflows" );\
ELLIPSIS_CONTRACT(66, !ckd_mul(&(size_t){}, (size_t)__LOC_ID_1_2, sizeof(__LOC_ID_1_5)), abort, true, "¬ckd_mul(&(size_t){}, (size_t)__LOC(3), sizeof(__LOC(0)))" , "assertion","the requested size overflows");\
__LOC_ID_1_3 = ellipsis‿malloc(sizeof(__LOC_ID_1_5[__LOC_ID_1_2]));\
/* By the constraints, if this is an array, the list is empty. */ \
ellipsis_init(__LOC_ID_1_2, __LOC_ID_1_3, __LOC_ID_1_5, __VA_ARGS__);\
__LOC_ID_1_3 = ellipsis‿init‿obfuscate(__LOC_ID_1_3);\
ELLIPSIS_CONTRACT(67, __LOC_ID_1_3, unreachable, false, "__LOC(2)" , "assumption","failed allocation");\
__LOC_ID_1_3;\
})
#define TARGET_TYPE(T)
Definition ellipsis-init.h:791
void * ellipsis‿init‿obfuscate(void *p)
Definition ellipsis-init.c:528
ellipsis‿malloc ellipsis‿malloc
Definition ellipsis-malloc.c:10

◆ ELLIPSIS_ALLOC_Iplus

#define ELLIPSIS_ALLOC_Iplus (   L,
  ... 
)    ELLIPSIS_ALLOC_I ## __VA_OPT__(Iplus) (L __VA_OPT__(,) __VA_ARGS__)

◆ ELLIPSIS_CONTRACT

#define ELLIPSIS_CONTRACT (   COUNT,
  COND,
  ACTION,
  VERB,
  CSTR,
  CTYPE,
  ... 
)
Value:
\
do { \
_Generic( \
default: ELLIPSIS_CONTRACT_IMPL(COUNT, COND, ACTION, VERB, CSTR, CTYPE __VA_OPT__(,) __VA_ARGS__));\
} while(false)
struct ellipsis‿contracts‿is_ice ellipsis‿contracts‿is_ice
Definition ellipsis-expression.c:24
#define ELLIPSIS_TEST_ICE(...)
Definition ellipsis-init.h:47
#define ELLIPSIS_CONTRACT_CHECK_STATIC(CTYPE, COND, CSTR,...)
Definition ellipsis-init.h:55
#define ELLIPSIS_CONTRACT_IMPL(COUNT, COND, ACTION, VERB, CSTR, CTYPE,...)
Definition ellipsis-init.h:37
#define __VA_OPT__
A pseudo macro that cannot be redefined.
Definition ellipsis-predefined.dirs:89

◆ ELLIPSIS_CONTRACT_CHECK_STATIC

#define ELLIPSIS_CONTRACT_CHECK_STATIC (   CTYPE,
  COND,
  CSTR,
  ... 
)
Value:
({\
static_assert(ELLIPSIS_CONTRACT_ICE_OR_TRUE(COND), \
"compile time violation of " CTYPE " " CSTR \
__VA_OPT__(", ") __VA_ARGS__ );\
})
#define ELLIPSIS_CONTRACT_ICE_OR_TRUE(...)
Definition ellipsis-init.h:49

◆ ELLIPSIS_CONTRACT_ICE_OR_TRUE

#define ELLIPSIS_CONTRACT_ICE_OR_TRUE (   ...)
Value:
_Generic( \
ELLIPSIS_TEST_ICE(__VA_ARGS__), \
ellipsis‿contracts‿is_ice*: (__VA_ARGS__), \
default: true)
#define true
The constant true made accessible to the preprocessor.
Definition ellipsis-builtins.dirs:32

◆ ELLIPSIS_CONTRACT_IMPL

#define ELLIPSIS_CONTRACT_IMPL (   COUNT,
  COND,
  ACTION,
  VERB,
  CSTR,
  CTYPE,
  ... 
)
Value:
(((false) || (COND)) \
? (void)0 \
: (ELLIPSIS_CONTRACT_VIOLATION(COUNT, VERB, CTYPE, CSTR __VA_OPT__(,) __VA_ARGS__) \
, ((false) \
? (void)0 \
: ACTION())))
#define ELLIPSIS_CONTRACT_VIOLATION(COUNT, VERB, CTYPE, CSTR,...)
Definition ellipsis-init.h:28

◆ ELLIPSIS_CONTRACT_VIOLATION

#define ELLIPSIS_CONTRACT_VIOLATION (   COUNT,
  VERB,
  CTYPE,
  CSTR,
  ... 
)
Value:
({\
static char const contract_format_ ## COUNT[] = \
__FILE__ ":" STRINGIFY(__LINE__) ": violation of " CTYPE " `" CSTR "`" __VA_OPT__(", ") __VA_ARGS__ "\n";\
(VERB \
? fputs(contract_format_ ## COUNT, stderr) \
: 0);\
})
#define __FILE__
The current source file as required by the C standard.
Definition ellipsis-builtins.dirs:21
#define __LINE__
The current physical source line as required by the C standard.
Definition ellipsis-builtins.dirs:24
#define STRINGIFY(...)
Definition ellipsis-init.h:25

◆ ellipsis_init

#define ellipsis_init (   L,
  P,
  ... 
)    ELLIPSIS_INIT_IIplus((L), (P) __VA_OPT__(,) __VA_ARGS__)

Initialize a target array at position P with a base type as indicated by T. T can be a typename of a pointer type or a pointer value. In most cases, the array has the pointed-to type by T unless the T is a void pointer in which case the array has base type unsigned char. P will in general be pointer returned by malloc or similar function.

This type-generic macro overwrites repeatedly *P as much contents as possible with an initializer of type indicated by T. If there is no initializer (... is empty or absent) a default initialized object is used. If T is missing, void* is used instead.

This macro also overwrites the effective type of the target array. That is, if the target is allocated (has no declaration) the initializer is copied into it and the effective type changes to the target type.

The implementation is a bit more complicated because we have to take care of implementations that do not yet implement {} initialization for_DEFER_REPLAY_FOR VLA.

◆ ELLIPSIS_INIT_DEFAULT

#define ELLIPSIS_INIT_DEFAULT   0

◆ ellipsis_init_flex

#define ellipsis_init_flex (   L,
  P,
  T,
  FL,
  LEN,
  ... 
)
Value:
((typeof(T)*restrict const){\
(L, sizeof(T), \
ELLIPSIS_INIT_FLEX_TYPE(((typeof(T)*)nullptr)->LEN), offsetof(typeof(T), LEN), \
sizeof(((typeof(T)*)nullptr)->FL[0]), offsetof(typeof(T), FL), \
(void*)(P), \
(void const*)&((typeof(T) const){__VA_ARGS__ }), \
(void const*)&((typeof(((typeof(T)*)nullptr)->FL[0]) const){})), })
void * ellipsis‿init‿flex_core_s(signed long long len, size_t size_base, ellipsis‿init‿flex type, size_t off_len, size_t size_dat, size_t off_dat, unsigned char ret[restrict static(off_dat+len *size_dat)], unsigned char const base_init[restrict static 1], unsigned char const dat_init[restrict static 1])
Definition ellipsis-init.h:210
void * ellipsis‿init‿flex_core_u(unsigned long long len, size_t size_base, ellipsis‿init‿flex type, size_t off_len, size_t size_dat, size_t off_dat, unsigned char ret[restrict static(off_dat+len *size_dat)], unsigned char const base_init[restrict static 1], unsigned char const dat_init[restrict static 1])
Definition ellipsis-init.h:168

◆ ELLIPSIS_INIT_FLEX_TYPE

#define ELLIPSIS_INIT_FLEX_TYPE (   ...)
Value:
_Generic((__VA_ARGS__), \
unsigned char: ellipsis‿init‿flex_uchar, \
unsigned short: ellipsis‿init‿flex_ushort, \
unsigned long: ellipsis‿init‿flex_ulong, \
unsigned long long: ellipsis‿init‿flex_ullong)
@ ellipsis‿init‿flex_unsigned
Definition ellipsis-init.h:105
@ ellipsis‿init‿flex_short
Definition ellipsis-init.h:102
@ ellipsis‿init‿flex_signed
Definition ellipsis-init.h:104
@ ellipsis‿init‿flex_schar
Definition ellipsis-init.h:100
@ ellipsis‿init‿flex_ushort
Definition ellipsis-init.h:103
@ ellipsis‿init‿flex_long
Definition ellipsis-init.h:106
@ ellipsis‿init‿flex_char
Definition ellipsis-init.h:99
@ ellipsis‿init‿flex_uchar
Definition ellipsis-init.h:101
@ ellipsis‿init‿flex_llong
Definition ellipsis-init.h:108
@ ellipsis‿init‿flex_ullong
Definition ellipsis-init.h:109
@ ellipsis‿init‿flex_ulong
Definition ellipsis-init.h:107

◆ ELLIPSIS_INIT_II

#define ELLIPSIS_INIT_II (   L,
 
)    ELLIPSIS_INIT_IIIIplus (L, P, void, ELLIPSIS_INIT_DEFAULT)

◆ ELLIPSIS_INIT_III

#define ELLIPSIS_INIT_III (   L,
  P,
 
)    ELLIPSIS_INIT_IIIIplus (L, P, T, ELLIPSIS_INIT_DEFAULT)

◆ ELLIPSIS_INIT_IIIIplus

#define ELLIPSIS_INIT_IIIIplus (   L,
  P,
  T,
  ... 
)
Value:
({\
/* captures */ \
auto const __LOC_ID_1_6 = (L);\
auto const __LOC_ID_1_7 = (typeof(T)*)(P);\
/* code */ \
auto const __LOC_ID_1_8 = TARGET_TYPE(__LOC_ID_1_7);\
typedef typeof(*__LOC_ID_1_8) __LOC_ID_1_9;\
/* Evaluate initializer in the calling context. */ \
/* By the constraints, if this is an array, the list is empty. */ \
/* So this works even if __LOC_ID_1_9 is a VLA type. */ \
/* A compound literal would not offer the same range of functionality. */ \
__LOC_ID_1_9 const __LOC_ID_1_10 = {__VA_ARGS__ };\
if (__LOC_ID_1_7) {\
ellipsis‿init‿repeat(sizeof(__LOC_ID_1_9), (void const*)&__LOC_ID_1_10, \
sizeof(__LOC_ID_1_9[__LOC_ID_1_6]), (void*)__LOC_ID_1_7);\
}\
ELLIPSIS_INIT_OBFUSCATE(__LOC_ID_1_7);\
})

◆ ELLIPSIS_INIT_IIIplus

#define ELLIPSIS_INIT_IIIplus (   L,
  P,
  T,
  ... 
)    ELLIPSIS_INIT_III ## __VA_OPT__(Iplus)(L, P, T __VA_OPT__(,) __VA_ARGS__)

◆ ELLIPSIS_INIT_IIplus

#define ELLIPSIS_INIT_IIplus (   L,
  P,
  ... 
)    ELLIPSIS_INIT_II ## __VA_OPT__(Iplus)(L, P __VA_OPT__(,) __VA_ARGS__)

◆ ELLIPSIS_INIT_OBFUSCATE

#define ELLIPSIS_INIT_OBFUSCATE (   X)    ((typeof(X)restrict const){ellipsis‿init‿obfuscate(X), })

Enable us to reinterpret a given pointer to carry a new object that does not alias with any object that we have seen so far.

◆ ELLIPSIS_INIT_WHEN_SIGNED

#define ELLIPSIS_INIT_WHEN_SIGNED (   X,
  A,
 
)
Value:
_Generic((char(*)[(((typeof(X))-1) < 0)+1]){}, \
char(*)[2]: (A), \
char(*)[1]: (B))

◆ ellipsis_realloc_flex

#define ellipsis_realloc_flex (   L,
  P,
  FL,
  LEN 
)
Value:
((typeof(P)restrict const){\
(L, P, sizeof(*P), \
ELLIPSIS_INIT_FLEX_TYPE(((typeof(P))nullptr)->LEN), offsetof(typeof(*(P)), LEN), \
sizeof((P)->FL[0]), offsetof(typeof(*(P)), FL), \
(void const*)&(typeof((P)->FL[0])){}), })
ellipsis‿realloc‿flex_core_u ellipsis‿realloc‿flex_core_u
Definition ellipsis-init.c:83
ellipsis‿realloc‿flex_core_s ellipsis‿realloc‿flex_core_s
Definition ellipsis-init.c:84

◆ ELLIPSIS_TEST_ICE

#define ELLIPSIS_TEST_ICE (   ...)    (false ? ELLIPSIS_TO_VOIDS(__VA_ARGS__) : (ellipsis‿contracts‿is_ice*)nullptr)

◆ ELLIPSIS_TO_VOIDS

#define ELLIPSIS_TO_VOIDS (   ...)    ((void*)((uintptr_t)((__VA_ARGS__)-(__VA_ARGS__))))

◆ STRINGIFY

#define STRINGIFY (   ...)    STRINGIFY_(__VA_ARGS__)

◆ STRINGIFY_

#define STRINGIFY_ (   ...)    #__VA_ARGS__

◆ TARGET_SIZE

#define TARGET_SIZE (   T)
Value:
({\
auto __LOC_ID_1_1 = (typeof(T))nullptr;\
((size_t)_Generic((typeof(*__LOC_ID_1_1)const volatile*)nullptr, \
void const volatile*: 1, \
default: sizeof(*__LOC_ID_1_1)));\
})

Determine element size of target array to which points T. T can be a typename of a pointer type or a pointer value. In most cases, the result type is just the size each element, unless the pointer is a void pointer in which case the size is 1.

◆ TARGET_TYPE

#define TARGET_TYPE (   T)
Value:
_Generic((typeof(*((typeof(T))nullptr))const volatile*)nullptr, \
void const volatile*: (unsigned char*)nullptr, \
default: ((typeof(T))nullptr))

Determine type of target array to which points T. T can be a typename of a pointer type or a pointer value. In most cases, the result type is an expression of the same type unless the pointer is a void pointer in which case the target type is changed to a unsigned char.

Typedef Documentation

◆ ellipsis‿contracts‿is_ice

◆ ellipsis‿init‿flex

Enumeration Type Documentation

◆ ellipsis‿init‿flex

Enumerator
ellipsis‿init‿flex_char 
ellipsis‿init‿flex_schar 
ellipsis‿init‿flex_uchar 
ellipsis‿init‿flex_short 
ellipsis‿init‿flex_ushort 
ellipsis‿init‿flex_signed 
ellipsis‿init‿flex_unsigned 
ellipsis‿init‿flex_long 
ellipsis‿init‿flex_ulong 
ellipsis‿init‿flex_llong 
ellipsis‿init‿flex_ullong 

Function Documentation

◆ ellipsis‿alloc‿flex_core_s‿_Ctra()

void * ellipsis‿alloc‿flex_core_s‿_Ctra ( signed long long  len,
size_t  size_base,
ellipsis‿init‿flex  type,
size_t  off_len,
size_t  size_dat,
size_t  off_dat,
unsigned char const  base_init[restrict static 1],
unsigned char const  dat_init[restrict static 1] 
)
inline

start inner defer anchor at level 1

DEFER_TYPE needs a semicolon

defer needs braces and a semicolon

end inner defer anchor, level 1

References ellipsis‿alloc‿flex_core_s‿_Ctra(), ellipsis‿alloc‿flex_core_s‿_Inner(), ellipsis‿init‿check_range(), ellipsis‿init‿check_type(), and ELLIPSIS_CONTRACT.

Referenced by ellipsis‿alloc‿flex_core_s‿_Ctra(), and ellipsis‿alloc‿flex_core_s‿_Insta().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ellipsis‿alloc‿flex_core_s()

void * ellipsis‿alloc‿flex_core_s ( signed long long  len,
size_t  size_base,
ellipsis‿init‿flex  type,
size_t  off_len,
size_t  size_dat,
size_t  off_dat,
unsigned char const  base_init[restrict static 1],
unsigned char const  dat_init[restrict static 1] 
)
inline

start inner defer anchor at level 1

DEFER_TYPE needs a semicolon

defer needs braces and a semicolon

end inner defer anchor, level 1

References ellipsis‿alloc‿flex_core_s‿_Insta(), ellipsis‿alloc‿flex_core_s, ellipsis‿init‿check_range(), ellipsis‿init‿check_type(), and ELLIPSIS_CONTRACT.

Here is the call graph for this function:

◆ ellipsis‿alloc‿flex_core_u‿_Ctra()

void * ellipsis‿alloc‿flex_core_u‿_Ctra ( unsigned long long  len,
size_t  size_base,
ellipsis‿init‿flex  type,
size_t  off_len,
size_t  size_dat,
size_t  off_dat,
unsigned char const  base_init[restrict static 1],
unsigned char const  dat_init[restrict static 1] 
)
inline

start inner defer anchor at level 1

DEFER_TYPE needs a semicolon

defer needs braces and a semicolon

end inner defer anchor, level 1

References ellipsis‿alloc‿flex_core_u‿_Ctra(), ellipsis‿alloc‿flex_core_u‿_Inner(), ellipsis‿init‿check_range(), ellipsis‿init‿check_type(), and ELLIPSIS_CONTRACT.

Referenced by ellipsis‿alloc‿flex_core_u‿_Ctra(), and ellipsis‿alloc‿flex_core_u‿_Insta().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ellipsis‿alloc‿flex_core_u()

void * ellipsis‿alloc‿flex_core_u ( unsigned long long  len,
size_t  size_base,
ellipsis‿init‿flex  type,
size_t  off_len,
size_t  size_dat,
size_t  off_dat,
unsigned char const  base_init[restrict static 1],
unsigned char const  dat_init[restrict static 1] 
)
inline

start inner defer anchor at level 1

DEFER_TYPE needs a semicolon

defer needs braces and a semicolon

end inner defer anchor, level 1

References ellipsis‿alloc‿flex_core_u‿_Insta(), ellipsis‿alloc‿flex_core_u, ellipsis‿init‿check_range(), ellipsis‿init‿check_type(), and ELLIPSIS_CONTRACT.

Here is the call graph for this function:

◆ ellipsis‿init‿check_range()

◆ ellipsis‿init‿check_type()

◆ ellipsis‿init‿flex_core_s‿_Ctra()

void * ellipsis‿init‿flex_core_s‿_Ctra ( signed long long  len,
size_t  size_base,
ellipsis‿init‿flex  type,
size_t  off_len,
size_t  size_dat,
size_t  off_dat,
unsigned char  ret[restrict static(off_dat+len *size_dat)],
unsigned char const  base_init[restrict static 1],
unsigned char const  dat_init[restrict static 1] 
)
inline

start inner defer anchor at level 1

DEFER_TYPE needs a semicolon

end inner defer anchor, level 1

References ellipsis‿init‿check_range(), ellipsis‿init‿check_type(), ellipsis‿init‿flex_core_s‿_Ctra(), ellipsis‿init‿flex_core_s‿_Inner(), and ELLIPSIS_CONTRACT.

Referenced by ellipsis‿init‿flex_core_s‿_Ctra(), and ellipsis‿init‿flex_core_s‿_Insta().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ellipsis‿init‿flex_core_s()

void * ellipsis‿init‿flex_core_s ( signed long long  len,
size_t  size_base,
ellipsis‿init‿flex  type,
size_t  off_len,
size_t  size_dat,
size_t  off_dat,
unsigned char  ret[restrict static(off_dat+len *size_dat)],
unsigned char const  base_init[restrict static 1],
unsigned char const  dat_init[restrict static 1] 
)
inline

start inner defer anchor at level 1

DEFER_TYPE needs a semicolon

end inner defer anchor, level 1

References ellipsis‿init‿check_range(), ellipsis‿init‿check_type(), ellipsis‿init‿flex_core_s‿_Insta(), ellipsis‿init‿flex_core_s(), and ELLIPSIS_CONTRACT.

Referenced by ellipsis‿init‿flex_core_s().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ellipsis‿init‿flex_core_u‿_Ctra()

void * ellipsis‿init‿flex_core_u‿_Ctra ( unsigned long long  len,
size_t  size_base,
ellipsis‿init‿flex  type,
size_t  off_len,
size_t  size_dat,
size_t  off_dat,
unsigned char  ret[restrict static(off_dat+len *size_dat)],
unsigned char const  base_init[restrict static 1],
unsigned char const  dat_init[restrict static 1] 
)
inline

start inner defer anchor at level 1

DEFER_TYPE needs a semicolon

end inner defer anchor, level 1

References ellipsis‿init‿check_range(), ellipsis‿init‿check_type(), ellipsis‿init‿flex_core_u‿_Ctra(), ellipsis‿init‿flex_core_u‿_Inner(), and ELLIPSIS_CONTRACT.

Referenced by ellipsis‿init‿flex_core_u‿_Ctra(), and ellipsis‿init‿flex_core_u‿_Insta().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ellipsis‿init‿flex_core_u()

void * ellipsis‿init‿flex_core_u ( unsigned long long  len,
size_t  size_base,
ellipsis‿init‿flex  type,
size_t  off_len,
size_t  size_dat,
size_t  off_dat,
unsigned char  ret[restrict static(off_dat+len *size_dat)],
unsigned char const  base_init[restrict static 1],
unsigned char const  dat_init[restrict static 1] 
)
inline

start inner defer anchor at level 1

DEFER_TYPE needs a semicolon

end inner defer anchor, level 1

References ellipsis‿init‿check_range(), ellipsis‿init‿check_type(), ellipsis‿init‿flex_core_u‿_Insta(), ellipsis‿init‿flex_core_u(), and ELLIPSIS_CONTRACT.

Referenced by ellipsis‿init‿flex_core_s‿_Inner(), and ellipsis‿init‿flex_core_u().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ellipsis‿init‿obfuscate()

void * ellipsis‿init‿obfuscate ( void *  p)

◆ ellipsis‿init‿repeat‿_Ctra()

void ellipsis‿init‿repeat‿_Ctra ( size_t  n,
unsigned char const  sample[restrict static n],
size_t  m,
unsigned char  buffer[restrict static m] 
)
inline

References ellipsis‿init‿repeat‿_Ctra(), ellipsis‿init‿repeat‿_Inner(), and ELLIPSIS_CONTRACT.

Referenced by ellipsis‿init‿repeat‿_Ctra(), and ellipsis‿init‿repeat‿_Insta().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ellipsis‿init‿repeat()

void ellipsis‿init‿repeat ( size_t  n,
unsigned char const  sample[restrict static n],
size_t  m,
unsigned char  buffer[restrict static m] 
)
inline

◆ ellipsis‿realloc‿flex_core_s‿_Ctra()

void * ellipsis‿realloc‿flex_core_s‿_Ctra ( signed long long  len,
void *  ostart_,
size_t  size_base,
ellipsis‿init‿flex  type,
size_t  off_len,
size_t  size_dat,
size_t  off_dat,
unsigned char const  ini[restrict static 1] 
)
inline

start inner defer anchor at level 1

DEFER_TYPE needs a semicolon

defer needs braces and a semicolon

end inner defer anchor, level 1

References ellipsis‿init‿check_range(), ellipsis‿init‿check_type(), ellipsis‿realloc‿flex_core_s‿_Ctra(), ellipsis‿realloc‿flex_core_s‿_Inner(), and ELLIPSIS_CONTRACT.

Referenced by ellipsis‿realloc‿flex_core_s‿_Ctra(), and ellipsis‿realloc‿flex_core_s‿_Insta().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ellipsis‿realloc‿flex_core_s()

void * ellipsis‿realloc‿flex_core_s ( signed long long  len,
void *  ostart_,
size_t  size_base,
ellipsis‿init‿flex  type,
size_t  off_len,
size_t  size_dat,
size_t  off_dat,
unsigned char const  ini[restrict static 1] 
)
inline

start inner defer anchor at level 1

DEFER_TYPE needs a semicolon

defer needs braces and a semicolon

end inner defer anchor, level 1

References ellipsis‿init‿check_range(), ellipsis‿init‿check_type(), ellipsis‿realloc‿flex_core_s‿_Insta(), ellipsis‿realloc‿flex_core_s, and ELLIPSIS_CONTRACT.

Here is the call graph for this function:

◆ ellipsis‿realloc‿flex_core_u‿_Ctra()

void * ellipsis‿realloc‿flex_core_u‿_Ctra ( unsigned long long  len,
void *  ostart_,
size_t  size_base,
ellipsis‿init‿flex  type,
size_t  off_len,
size_t  size_dat,
size_t  off_dat,
unsigned char const  ini[restrict static 1] 
)
inline

start inner defer anchor at level 1

DEFER_TYPE needs a semicolon

defer needs braces and a semicolon

end inner defer anchor, level 1

References ellipsis‿init‿check_range(), ellipsis‿init‿check_type(), ellipsis‿realloc‿flex_core_u‿_Ctra(), ellipsis‿realloc‿flex_core_u‿_Inner(), and ELLIPSIS_CONTRACT.

Referenced by ellipsis‿realloc‿flex_core_u‿_Ctra(), and ellipsis‿realloc‿flex_core_u‿_Insta().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ellipsis‿realloc‿flex_core_u()

void * ellipsis‿realloc‿flex_core_u ( unsigned long long  len,
void *  ostart_,
size_t  size_base,
ellipsis‿init‿flex  type,
size_t  off_len,
size_t  size_dat,
size_t  off_dat,
unsigned char const  ini[restrict static 1] 
)
inline

start inner defer anchor at level 1

DEFER_TYPE needs a semicolon

defer needs braces and a semicolon

end inner defer anchor, level 1

References ellipsis‿init‿check_range(), ellipsis‿init‿check_type(), ellipsis‿realloc‿flex_core_u‿_Insta(), ellipsis‿realloc‿flex_core_u, and ELLIPSIS_CONTRACT.

Here is the call graph for this function:

Variable Documentation

◆ ellipsis‿contracts‿ignore‿dynamic

thread_local bool volatile ellipsis‿contracts‿ignore‿dynamic
extern

◆ ellipsis‿contracts‿proceed‿dynamic

thread_local bool volatile ellipsis‿contracts‿proceed‿dynamic
extern

◆ ellipsis‿contracts‿verbose‿dynamic

thread_local bool volatile ellipsis‿contracts‿verbose‿dynamic
extern