eĿlipsis
a language independent preprocessor
 
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Loading...
Searching...
No Matches
ellipsis-error.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __STRINGIFY__(...)   #__VA_ARGS__
 
#define _Lengthof(A)
 Compute the number of elements in an array.
 
#define ELLIPSIS_BUG(FORMAT, ...)   ellipsis‿error("error, " FORMAT "\n" __VA_OPT__(,) __VA_ARGS__)
 Indicate an error, considered to be an internal error of lip, on stderr and terminate execution.
 
#define ELLIPSIS_DIAGNOSTIC(FORMAT, ...)   ellipsis‿error‿diagnostic("diagnostic, " FORMAT "\n" __VA_OPT__(,) __VA_ARGS__)
 Issue a diagnostic on stderr.
 
#define ELLIPSIS_ERROR(FORMAT, ...)   ellipsis‿error("error, " FORMAT "\n" __VA_OPT__(,) __VA_ARGS__)
 Indicate an error on stderr and terminate execution.
 
#define ELLIPSIS_ERROR_CHECK(F, MESSAGE, ...)
 
#define ELLIPSIS_WARNING(FORMAT, ...)   ellipsis‿error‿warning("warning, " FORMAT "\n" __VA_OPT__(,) __VA_ARGS__)
 Issue a warning on stderr.
 
#define GNU_ATTR_ACCESS(...)
 
#define GNU_ATTR_COUNTED_BY(...)
 
#define GNU_ATTR_FORMAT_PRINTF(...)
 
#define GNU_ATTR_MALLOC(...)
 
#define GNU_ATTR_RETURNS_NONNULL
 
#define GNU_ATTR_STRICT_FLEX_ARRAY(...)
 
#define GNU_ATTR_USED
 
#define STDC_ATTR_NODISCARD(...)
 

Functions

 GNU_ATTR_FORMAT_PRINTF (1, 2) void ellipsis‿error(char const __LOC_ID_0_1[]
 Indicate an error on stderr and terminate execution.
 

Variables

bool ellipsis‿error‿dump
 
_Atomic bool ellipsis‿error‿finished
 
bool ellipsis‿error‿verb
 

Detailed Description

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

Macro Definition Documentation

◆ __STRINGIFY__

#define __STRINGIFY__ (   ...)    #__VA_ARGS__

◆ _Lengthof

#define _Lengthof (   A)
Value:
_Generic(&(typeof(&((A)[0]))){}, \
typeof(A)*: (struct {\
static_assert(_Generic(&(typeof(&((A)[0]))){}, typeof(A)*: false, default: true), \
"_Lengthof needs an array parameter"); \
size_t _z; \
}){}._z, \
default: sizeof(A)/sizeof((A)[0]))

Compute the number of elements in an array.

Produces an error if the argument is not an array.

The result is an integer constant expression if the array is not a VLA; otherwise the argument expression may be evaluated.

◆ ELLIPSIS_BUG

#define ELLIPSIS_BUG (   FORMAT,
  ... 
)    ellipsis‿error("error, " FORMAT "\n" __VA_OPT__(,) __VA_ARGS__)

Indicate an error, considered to be an internal error of lip, on stderr and terminate execution.

◆ ELLIPSIS_DIAGNOSTIC

#define ELLIPSIS_DIAGNOSTIC (   FORMAT,
  ... 
)    ellipsis‿error‿diagnostic("diagnostic, " FORMAT "\n" __VA_OPT__(,) __VA_ARGS__)

Issue a diagnostic on stderr.

◆ ELLIPSIS_ERROR

#define ELLIPSIS_ERROR (   FORMAT,
  ... 
)    ellipsis‿error("error, " FORMAT "\n" __VA_OPT__(,) __VA_ARGS__)

Indicate an error on stderr and terminate execution.

◆ ELLIPSIS_ERROR_CHECK

#define ELLIPSIS_ERROR_CHECK (   F,
  MESSAGE,
  ... 
)
Value:
({\
auto __LOC_ID_1_1 = F(__VA_ARGS__); \
if (!__LOC_ID_1_1) {\
ELLIPSIS_ERROR(__FILE__ ":" __STRINGIFY__(__LINE__) ": " MESSAGE); \
} \
__LOC_ID_1_1; \
})
#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-error.h:19

◆ ELLIPSIS_WARNING

#define ELLIPSIS_WARNING (   FORMAT,
  ... 
)    ellipsis‿error‿warning("warning, " FORMAT "\n" __VA_OPT__(,) __VA_ARGS__)

Issue a warning on stderr.

◆ GNU_ATTR_ACCESS

#define GNU_ATTR_ACCESS (   ...)

◆ GNU_ATTR_COUNTED_BY

#define GNU_ATTR_COUNTED_BY (   ...)

◆ GNU_ATTR_FORMAT_PRINTF

#define GNU_ATTR_FORMAT_PRINTF (   ...)

◆ GNU_ATTR_MALLOC

#define GNU_ATTR_MALLOC (   ...)

◆ GNU_ATTR_RETURNS_NONNULL

#define GNU_ATTR_RETURNS_NONNULL

◆ GNU_ATTR_STRICT_FLEX_ARRAY

#define GNU_ATTR_STRICT_FLEX_ARRAY (   ...)

◆ GNU_ATTR_USED

#define GNU_ATTR_USED

◆ STDC_ATTR_NODISCARD

#define STDC_ATTR_NODISCARD (   ...)

Function Documentation

◆ GNU_ATTR_FORMAT_PRINTF()

GNU_ATTR_FORMAT_PRINTF ( ,
 
) const

Indicate an error on stderr and terminate execution.

Code is on error when a call to this function is reached.

Issue a diagnostic on stderr.

Issue a warning on stderr.

If it is linked to your executable and called, it indicates an error on stderr and terminate execution.

Generally, all calls to this function should disappear when fully optimizing your code. So the default is not to provide this function and let your code fail when linking if a call is issued.

Variable Documentation

◆ ellipsis‿error‿dump

◆ ellipsis‿error‿finished

◆ ellipsis‿error‿verb