P99
|
Macros that implement controlling blocks. More...
#include "p99_int.h"
Go to the source code of this file.
Macros | |
#define | P99_ALLOW(NAME) |
Allow the use of feature NAME inside the dependent code. More... | |
#define | P99_AVOID for (;0;) |
#define | P99_BLK_MARK(X) |
mark the assembler of a block just before and after More... | |
#define | P99_BLOCK(...) P99_PREFER(__VA_ARGS__) P99_NOP |
#define | P99_BLOCK_DOCUMENT |
Add some default documentation and links to the following block macro. More... | |
#define | P99_CHECK_RETURN |
Insert code checks for bare return statements inside P99_UNWIND_PROTECT. More... | |
#define | P99_DECLARE_INHIBIT(NAME) enum { P00_INHIBIT(NAME,) = 0 } |
Declare a feature NAME that can be inhibited or allowed at compile time in certain parts of code. More... | |
#define | P99_GUARDED_BLOCK(T, NAME, INITIAL, BEFORE, AFTER) |
A meta-macro to protect a dependent block or statement by a guard variable NAME of type T. More... | |
#define | P99_HANDLE_ERRNO |
Handle and reset errno . More... | |
#define | P99_INHIBIT(NAME) |
Inhibit the use of feature NAME inside the dependent code. More... | |
#define | P99_INHIBIT_CHECK(NAME) switch (P99_STRINGIFY(P00_INHIBIT(NAME,))[P00_INHIBIT(NAME,)]) default: |
Error out at compile time if NAME is inhibited. More... | |
#define | P99_INVARIANT(EXPR) P99_PROTECTED_BLOCK(assert((EXPR) && "failed at beginning of block"), assert((EXPR) && "failed at end of block")) |
Assert runtime condition EXPR when entering or leaving the dependent block. More... | |
#define | P99_MARK(X) P99_NOP |
mark the produced assembler with a comment that contains the source line number and the token X More... | |
#define | P99_NOP ((void)0) |
Do nothing. More... | |
#define | P99_PROTECT |
The pseudo label to which we jump when we unwind the stack with P99_UNWIND. More... | |
#define | P99_PROTECTED_BLOCK(BEFORE, AFTER) |
A meta-macro to protect a dependent block or statement by the statements BEFORE that is executed before the block and AFTER that is executed afterward. More... | |
#define | P99_SIMPLE_BLOCKS 0 |
A bug avoiding macro to reduce the depth of some code produced by P99. More... | |
#define | P99_UNCASE P00_UNCASE : |
A command prefixed with this cannot be a case target from surrounding scopes. More... | |
#define | P99_UNWIND(X) p00_unwind(p00_unwind_top, p99_unwind_level, (X)) |
Preliminary resume from one or several levels of nested P99_UNWIND_PROTECT. More... | |
#define | p99_unwind_code ((int)(p00_unwind_top[0].p00_code)) |
The code an eventual call to P99_UNWIND. More... | |
#define | P99_UNWIND_PROTECT |
Unwind execution from several levels of nesting inside a function. More... | |
#define | P99_UNWIND_RETURN |
Return from the enclosing function after unwinding all levels of nested P99_UNWIND_PROTECT. More... | |
#define | P99_XCASE P99_AVOID case |
#define | P99_XDEFAULT P99_AVOID default |
Enumerations | |
enum | |
enum | p99_unwind { p99_unwind_level = 0 , p99_unwind_return = INT_MAX } |
Functions | |
for (_Bool p00=1;p00 &&({ { __VA_ARGS__ } 1;});p00=0) typedef enum p00_uncase_enum | |
Prefer the statements in the argument list over the statement or block that follows. More... | |
Macros that implement controlling blocks.
Definition in file p99_block.h.