P99

◆ P99_DECLARE_INLINE_EXPRESSIONS

#define P99_DECLARE_INLINE_EXPRESSIONS (   NEPL,
  ... 
)

Declare a whole bunch of inline functions of basename BASE for expression EXP, applied to the builtin types as given in the argument list.

The motivation for declaring such functions is for expressions that evaluate their arguments multiple times. You can use these functions in a generic expression such as P99_GEN_EXPR.

NEPL represents the argument list that is passed to P99_DECLARE_INLINE_EXPRESSION for defining the individual functions.

P99_DECLARE_INLINE_EXPRESSIONS((my_max, ((a >= b) ? a : b), a, b),
u, ul, i, c, uhh);

This declares inline functions with the following prototypes:

unsigned p00_gen_my_maxu(unsigned, unsigned);
unsigned long p00_gen_my_maxul(unsigned long, unsigned long);
signed p00_gen_my_maxi(signed, signed);
char p00_gen_my_maxc(char, char);
unsigned char p00_gen_my_maxuhh(unsigned char, unsigned char);
See also
P99_BUILTIN_TYPE
P99_GENERIC
P99_GEN_EXPR
P99_DECLARE_INLINE_EXPRESSION

Definition at line 926 of file p99_generic.h.

P99_DECLARE_INLINE_EXPRESSIONS
#define P99_DECLARE_INLINE_EXPRESSIONS(NEPL,...)
Declare a whole bunch of inline functions of basename BASE for expression EXP, applied to the builtin...
Definition: p99_generic.h:926
i
P00_CLAUSE2 i(_Pragma("weak p00_getopt_comp"))(_Pragma("weak p00_getopt_comp