http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57714
--- Comment #16 from Harald van Dijk <harald at gigawatt dot nl> --- (In reply to David Krauss from comment #14) > 1. Actually the C standard does care whether whitespace is added. You're right for stringizing, but GCC already takes care to treat that as a special case. #define ID(x) x #define STR(x) STR_(x) #define STR_(x) #x STR(ID(1)ID(2))ID(3)ID(4) preprocesses to "12"3 4 No space is inserted between the 1 and 2, because the C standard does not allow that. No space is inserted between "12" and 3, because no space was present in the input and no space is required. A space is inserted between 3 and 4 because the preprocessed output would be misinterpreted otherwise. > 2. Whitespace does not need to be added to cause the visual formatting of the > output to match the input. The trick is to output a backslash character in > the output. A trailing backslash at the end of a line after preprocessing is a syntax error and is treated as such by GCC. What you suggest requires running the result through the preprocessor again in order to be able to compile the result. Note that int main() { ret\ urn 0; } is perfectly valid, but #define ID(x) x int main() { ID(ret)ID(\) urn 0; } is not. If these become undistinguishable after preprocessing, it is impossible to diagnose the syntax error, and that diagnostic is required.