Modular C
+ Collaboration diagram for C◼is:

Modules

 C◼is◼ptrdiff: symbols inserted from C◼ptrdiff.
 
 Specific macros to deal with the structure of module C◼is.
 

Macros

#define C◼is◼RVALUE(...)   C◼is◼RVALUE0(__VA_ARGS__, 0, )
 
#define C◼is◼RVALUE0(T, V, ...)   ((T)+(V))
 
#define C◼is◼SIGNED(T)   C◼signof((T){ 0 })
 
#define C◼is◼POINTER(T)   (_Generic(C◼is◼RVALUE(T)+C◼is◼RVALUE(C◼ptrdiff), /* T is integer at least as wide: */ C◼ptrdiff: 0, default: (_Generic(C◼is◼RVALUE(T)-C◼is◼RVALUE(T), /* T can't be ptrdiff*/ C◼ptrdiff: 1, default: 0))))
 
#define C◼is◼LVALUE(T)   ((T){ 0 })
 
#define C◼is◼ICE(X)   _Generic((1 ? (C◼is◼ice_tester*)0 : (void*)(C◼intptr)((X)-(X))), C◼is◼ice_tester*: 1, default: 0)
 
#define C◼is◼VLA(X)   (¬C◼is◼ICE(sizeof(X)))
 

Typedefs

typedef struct C◼is◼ice_tester C◼is◼ice_tester
 

Functions

void C◼is◼test0 (void)
 

Detailed Description

Macro Definition Documentation

§ C◼is◼ICE

#define C◼is◼ICE (   X)    _Generic((1 ? (C◼is◼ice_tester*)0 : (void*)(C◼intptr)((X)-(X))), C◼is◼ice_tester*: 1, default: 0)

Definition at line 70 of file C-is.c.

§ C◼is◼LVALUE

#define C◼is◼LVALUE (   T)    ((T){ 0 })

Definition at line 67 of file C-is.c.

§ C◼is◼POINTER

#define C◼is◼POINTER (   T)    (_Generic(C◼is◼RVALUE(T)+C◼is◼RVALUE(C◼ptrdiff), /* T is integer at least as wide: */ C◼ptrdiff: 0, default: (_Generic(C◼is◼RVALUE(T)-C◼is◼RVALUE(T), /* T can't be ptrdiff*/ C◼ptrdiff: 1, default: 0))))

Definition at line 64 of file C-is.c.

Referenced by C◼sizeptr◼list◼push(), C◼size◼list◼push(), and push().

§ C◼is◼RVALUE

#define C◼is◼RVALUE (   ...)    C◼is◼RVALUE0(__VA_ARGS__, 0, )

Definition at line 59 of file C-is.c.

§ C◼is◼RVALUE0

#define C◼is◼RVALUE0 (   T,
  V,
  ... 
)    ((T)+(V))

Definition at line 60 of file C-is.c.

§ C◼is◼SIGNED

#define C◼is◼SIGNED (   T)    C◼signof((T){ 0 })

Definition at line 62 of file C-is.c.

Referenced by C◼sizeptr◼list◼push(), C◼size◼list◼push(), and push().

§ C◼is◼VLA

#define C◼is◼VLA (   X)    (¬C◼is◼ICE(sizeof(X)))

Definition at line 72 of file C-is.c.

Typedef Documentation

§ C◼is◼ice_tester

Definition at line 69 of file C-is.c.

Function Documentation

§ C◼is◼test0()

void C◼is◼test0 ( void  )

Definition at line 79 of file C-is.c.

79  {
80 #line 32 "/home/gustedt/build/cmod/C/C-is.X"
81  _Static_assert(C◼is◼POINTER(C◼ptrdiff*), "macro POINTER isn't working properly");
82  _Static_assert(C◼is◼POINTER(C◼is◼LVALUE(C◼ptrdiff*)), "macro POINTER isn't working properly");
83  _Static_assert(¬C◼is◼POINTER(C◼ptrdiff), "macro POINTER isn't working properly");
84  _Static_assert(¬C◼is◼POINTER(C◼is◼LVALUE(C◼ptrdiff)), "macro POINTER isn't working properly");
85  _Static_assert(C◼is◼POINTER(void const*), "macro POINTER isn't working properly");
86  _Static_assert(C◼is◼POINTER(C◼is◼LVALUE(void const*)), "macro POINTER isn't working properly");
87  _Static_assert(¬C◼is◼POINTER(int), "macro POINTER isn't working properly");
88  _Static_assert(¬C◼is◼POINTER(C◼is◼LVALUE(int)), "macro POINTER isn't working properly");
89  _Static_assert(C◼is◼POINTER(short*), "macro POINTER isn't working properly");
90  _Static_assert(C◼is◼POINTER(C◼is◼LVALUE(short*)), "macro POINTER isn't working properly");
91  _Static_assert(¬C◼is◼POINTER(short), "macro POINTER isn't working properly");
92  _Static_assert(¬C◼is◼POINTER(C◼is◼LVALUE(short)), "macro POINTER isn't working properly");
93  _Static_assert(C◼is◼RVALUE(unsigned, 0) ≡ 0U, "macro RVALUE isn't working properly");
94  _Static_assert(C◼is◼RVALUE(unsigned, 1) ≡ 1U, "macro RVALUE isn't working properly");
95  _Static_assert(C◼is◼RVALUE(unsigned, -1) ≡ -1U, "macro RVALUE isn't working properly");
96  _Static_assert(C◼is◼SIGNED(C◼ptrdiff), "macro SIGNED isn't working properly");
97  _Static_assert(¬C◼is◼SIGNED(unsigned), "macro SIGNED isn't working properly");
98  _Static_assert(C◼is◼SIGNED(signed char), "macro SIGNED isn't working properly");
99  _Static_assert(¬C◼is◼SIGNED(unsigned char), "5 macro SIGNED isn't working properly");
100  enum _MODULE_tag_sA2XHJsD_58{ m = 77 };
101  _Static_assert(C◼is◼ICE(m), "macro ICE isn't working properly");
102  unsigned n = 77;
103  _Static_assert(¬C◼is◼ICE(n), "macro ICE isn't working properly");
104  _Static_assert(¬C◼is◼VLA(int[m]), "macro VLA isn't working properly");
105  _Static_assert(C◼is◼VLA(int[n]), "macro VLA isn't working properly");
106 }
C◼ptrdiff C◼ptrdiff
Definition: C-is.c:143
#define C◼is◼SIGNED(T)
Definition: C-is.c:62
#define C◼is◼RVALUE(...)
Definition: C-is.c:59
#define C◼is◼POINTER(T)
Definition: C-is.c:64
#define C◼is◼ICE(X)
Definition: C-is.c:70
#define C◼is◼LVALUE(T)
Definition: C-is.c:67
#define C◼is◼VLA(X)
Definition: C-is.c:72