P99
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Modules | Macros | Enumerations
Preprocessor Blocks

This defines some macros that can be used to ensure that certain operations are always executed before entering and after leaving a particular block. More...

+ Collaboration diagram for Preprocessor Blocks:

Modules

 Checking code validity
 
 Try, catch and finally blocks
 

Macros

#define P99_AVOID   for (;0;)
 Only execute the depending statement or block if it is jumped into explicitly from the outer block. More...
 
#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
 Execute the statements in the argument list. More...
 
#define P99_BLOCK_DOCUMENT
 Add some default documentation and links to the following block macro. More...
 
#define P99_CASERANGE(START, LEN,...)
 implement a range syntax for case labels. More...
 
#define P99_DO(TYPE, VAR, LOW, LEN, INCR)   for(;;)
 A fortran like do-loop with bounds that are fixed at the beginning. More...
 
#define P99_FORALL(NAME,...)   P00_FORALL(P99_NARG(__VA_ARGS__), NAME, __VA_ARGS__)
 A multi-index for loop. 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_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_PARALLEL_DO(TYPE, VAR, LOW, LEN, INCR)   for(;;)
 as P99_DO but performs the iterations out of order More...
 
#define P99_PARALLEL_FOR   _Pragma(P99_PARALLEL_PRAGMA) for
 Declare a for loop for which all iterations can be run independently and out of order. More...
 
#define P99_PARALLEL_FORALL(NAME,...)   P00_PARALLEL_FORALL(P99_NARG(__VA_ARGS__), NAME, __VA_ARGS__)
 A multi-index for loop who's dependent statement or block may be executed out of order. More...
 
#define P99_PREFER(...)   if (1) { __VA_ARGS__ } else
 Prefer the statements in the argument list over the statement or block that follows. 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
 An exclusive case for a switch statement. More...
 
#define P99_XDEFAULT   P99_AVOID default
 The default case analogous to P99_XCASE. More...
 

Enumerations

enum  p99_unwind { p99_unwind_level = 0 , p99_unwind_return = INT_MAX }
 

Detailed Description

This defines some macros that can be used to ensure that certain operations are always executed before entering and after leaving a particular block.