C ++ has a function called "string string literals" introduced by a letter R
.
gcc explicitly supports C ++ type string literals in C as an extension. If you used a name other than R
your macro, you would not have this problem.
Concatenation of string literals does not require string literal offsets. Instead of this:
#define R "car"
const char * s1 = "foo"R"bar";
:
#define R "car"
const char * s1 = "foo" R "bar";
C, gcc , , -std=c11
, gcc .
, , , R
.