#include <uchar.h>
#include <stdio.h>
#include <string.h>
#include "ellipsis-error.h"
#include <stddef.h>
#include <stdlib.h>
#include <stdint.h>
Go to the source code of this file.
|
#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_STR8_CONSTRUCT(S) |
| Construct a ellipsis‿str8 from a string literal and return a pointer to it.
|
|
#define | ELLIPSIS_STR8_LITERAL ELLIPSIS_STR8_LITERAL_LOCAL |
|
#define | ELLIPSIS_STR8_LITERAL_GLOBAL(N, ...) |
|
#define | ELLIPSIS_STR8_LITERAL_LOCAL(N, ...) |
| Create a literal of type ellipsis‿str8 , where the array component is initialized with the arguments.
|
|
#define | ELLIPSIS_STR8_OVERLAY(N) |
|
#define | ELLIPSIS_STR8_STATIC(N, ...) |
|
#define | ELLIPSIS_STR8_STRING_LITERAL(S) |
| Construct a ellipsis‿str8 const from a string literal.
|
|
#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__ |
|
◆ ELLIPSIS_CONTRACT
#define ELLIPSIS_CONTRACT |
( |
|
COUNT, |
|
|
|
COND, |
|
|
|
ACTION, |
|
|
|
VERB, |
|
|
|
CSTR, |
|
|
|
CTYPE, |
|
|
|
... |
|
) |
| |
Value: \
do { \
_Generic( \
} while(false)
struct ellipsis‿contracts‿is_ice ellipsis‿contracts‿is_ice
Definition ellipsis-expression.c:24
#define __VA_OPT__
A pseudo macro that cannot be redefined.
Definition ellipsis-predefined.dirs:89
#define ELLIPSIS_TEST_ICE(...)
Definition ellipsis-str8.h:65
#define ELLIPSIS_CONTRACT_CHECK_STATIC(CTYPE, COND, CSTR,...)
Definition ellipsis-str8.h:73
#define ELLIPSIS_CONTRACT_IMPL(COUNT, COND, ACTION, VERB, CSTR, CTYPE,...)
Definition ellipsis-str8.h:55
◆ ELLIPSIS_CONTRACT_CHECK_STATIC
#define ELLIPSIS_CONTRACT_CHECK_STATIC |
( |
|
CTYPE, |
|
|
|
COND, |
|
|
|
CSTR, |
|
|
|
... |
|
) |
| |
Value: ({\
"compile time violation of " CTYPE " " CSTR \
})
#define ELLIPSIS_CONTRACT_ICE_OR_TRUE(...)
Definition ellipsis-str8.h:67
◆ ELLIPSIS_CONTRACT_ICE_OR_TRUE
#define ELLIPSIS_CONTRACT_ICE_OR_TRUE |
( |
|
... | ) |
|
Value: _Generic( \
#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 \
, ((false) \
? (void)0 \
: ACTION())))
#define ELLIPSIS_CONTRACT_VIOLATION(COUNT, VERB, CTYPE, CSTR,...)
Definition ellipsis-str8.h:46
◆ ELLIPSIS_CONTRACT_VIOLATION
#define ELLIPSIS_CONTRACT_VIOLATION |
( |
|
COUNT, |
|
|
|
VERB, |
|
|
|
CTYPE, |
|
|
|
CSTR, |
|
|
|
... |
|
) |
| |
Value:({\
static char const contract_format_ ## COUNT[] = \
(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-str8.h:43
◆ ELLIPSIS_STR8_CONSTRUCT
#define ELLIPSIS_STR8_CONSTRUCT |
( |
|
S | ) |
|
|
related |
Construct a ellipsis‿str8
from a string literal and return a pointer to it.
◆ ELLIPSIS_STR8_LITERAL
#define ELLIPSIS_STR8_LITERAL ELLIPSIS_STR8_LITERAL_LOCAL |
◆ ELLIPSIS_STR8_LITERAL_GLOBAL
#define ELLIPSIS_STR8_LITERAL_GLOBAL |
( |
|
N, |
|
|
|
... |
|
) |
| |
Value:
sizeof((ellipsis‿str8‿base[]){__VA_ARGS__ }) \
/sizeof(ellipsis‿str8‿base))) \
{\
.length = (N), \
.array = {__VA_ARGS__ }, \
}.fa)
#define ELLIPSIS_STR8_OVERLAY(N)
Definition ellipsis-str8.h:187
◆ ELLIPSIS_STR8_LITERAL_LOCAL
#define ELLIPSIS_STR8_LITERAL_LOCAL |
( |
|
N, |
|
|
|
... |
|
) |
| |
|
related |
Create a literal of type ellipsis‿str8
, where the array
component is initialized with the arguments.
This results in an lvalue of type ellipsis‿str8
for an object that has static storage duration and that is const
-qualified.
Most functions that are provided for ellipsis‿str8
need to be able to reallocate the structure, so they will produce an error on a literal that is created with this macro. A notable exception of this is ellipsis‿str8‿delete
which will just do nothing on such an object.
◆ ELLIPSIS_STR8_OVERLAY
#define ELLIPSIS_STR8_OVERLAY |
( |
|
N | ) |
|
Value: union {\
struct {\
size_t const length;\
size_t const padding;\
unsigned const :(offsetof(
ellipsis‿str8, array)-2*
sizeof(size_t));\
ellipsis‿str8‿base array[N];\
};\
}
A structure with a flexible array member of base type ellipsis‿str8‿base.
Definition ellipsis-str8.h:150
◆ ELLIPSIS_STR8_STATIC
#define ELLIPSIS_STR8_STATIC |
( |
|
N, |
|
|
|
... |
|
) |
| |
Value: (({\
sizeof((ellipsis‿str8‿base[]){__VA_ARGS__ }) \
/sizeof(ellipsis‿str8‿base)) \
__LOC_ID_1_1 = {\
.length = (N), \
.array = {__VA_ARGS__ }, \
};&__LOC_ID_1_1;})->fa)
◆ ELLIPSIS_STR8_STRING_LITERAL
#define ELLIPSIS_STR8_STRING_LITERAL |
( |
|
S | ) |
|
|
related |
Construct a ellipsis‿str8 const
from a string literal.
Use this as in
__directive__ always
Always expand the code up to the next #end or #endif.
Definition directives.c:151
or
ellipsis‿str8 const* ulways = &ELLIPSIS_STR8_STRING_LITERAL(u8
"ulways");
◆ ELLIPSIS_TEST_ICE
◆ ELLIPSIS_TO_VOIDS
#define ELLIPSIS_TO_VOIDS |
( |
|
... | ) |
((void*)((uintptr_t)((__VA_ARGS__)-(__VA_ARGS__)))) |
◆ STRINGIFY
◆ STRINGIFY_
#define STRINGIFY_ |
( |
|
... | ) |
#__VA_ARGS__ |
◆ ellipsis‿contracts‿is_ice
◆ 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 |