...
Code Block | ||||
---|---|---|---|---|
| ||||
#define assign(uc1, uc2, val) uc1##uc2 = val; void func(void) { int \u0401; /* ... */ assign( \u04, 01, 4); /* ... */ } |
Implementation Details
This code compiles and runs with Microsoft Visual Studio 2012, assigning 4 to the variable as expected.
...
Code Block | ||||
---|---|---|---|---|
| ||||
#define assign(ucn, val) ucn = val; void func(void) { int \u0401; /* ... */ assign( \u0401, 4); /* ... */ } |
Risk Assessment
Creating a universal character name through token concatenation results in undefined behavior.
...