CIR Playground
Load example...
CIR on GitHub
Input
Run
int printf(const char *, ...); // Symbols introduced by C preprocessor macros may accidentally capture symbols // in user code. // // Consider the following repeat C preprocessor macro which repeats a piece of // code `n` times: #define repeat(n, code) for (int i = 0; i < n; i = i + 1) code int main(void) { int i = 20; repeat(3, printf("The value of i is %d\n", i)); return 0; } // Users would expect "The value of i is 20" to be repeated 3 times. However, // the output of this program is instead: // // The value of i is 0 // The value of i is 1 // The value of i is 2 // // This is because the variable i was captured by the temporary variable i // introduced by the repeat() macro.
stdout
stderr
Load Example...
×
00 - Compile-time fibonacci
01 - Inline Repeat
02 - Compile-time strtok
03 - Does a code call a function
04 - C Preprocessor identifiers may be accidentally shadowed
05 - CIR identifiers won't be accidentally shadowed
06 - C Preprocessor accidental capture of symbols
07 - CIR won't accidentally capture symbols
08 - bf-to-C (low level ver)
09 - bf-to-C (with quote-antiquote)
10 - async-await
11 - Embed an external file
12 - zlib