15 Preprocessing directives [cpp]

15.6 Macro replacement [cpp.replace]

15.6.3 The # operator [cpp.stringize]

Each # preprocessing token in the replacement list for a function-like macro shall be followed by a parameter as the next preprocessing token in the replacement list.
If, in the replacement list, a parameter is immediately preceded by a # preprocessing token, both are replaced by a single character string literal preprocessing token that contains the spelling of the preprocessing token sequence for the corresponding argument (excluding placemarker tokens).
Let the stringizing argument be the preprocessing token sequence for the corresponding argument with placemarker tokens removed.
Each occurrence of whitespace between the stringizing argument's preprocessing tokens becomes a single space character in the character string literal.
Whitespace before the first preprocessing token and after the last preprocessing token comprising the stringizing argument is deleted.
Otherwise, the original spelling of each preprocessing token in the stringizing argument is retained in the character string literal, except for special handling for producing the spelling of string-literals and character-literals: a \ character is inserted before each " and \ character of a character-literal or string-literal (including the delimiting " characters).
If the replacement that results is not a valid character string literal, the behavior is undefined.
The character string literal corresponding to an empty stringizing argument is "".
The order of evaluation of # and ## operators is unspecified.