Created on 2013-02-18.00:00:00 last changed 140 months ago
Notes from the April, 2013 meeting:
Because the preprocessor specification is primarily copied directly from the C Standard, this issue has been referred to the C liaison for consultation with WG14.
Given the following input,
#define F(A, B, C) A ## x.B ## y.C ## z #define STRINGIFY(x) #x #define EXPAND_AND_STRINGIFY(x) STRINGIFY(x) char v[] = EXPAND_AND_STRINGIFY(F(a, b, c))
there is implementation variance in the value of v: some produce the string "ax.by.cz" and others produce the string "ax. by. cz". Although 15.6.3 [cpp.stringize] paragraph 2 is explicit in its treatment of leading and trailing white space, it is not clear whether there is latitude for inserting spaces between tokens, as some implementations do, since the description otherwise is written solely in terms of preprocessing tokens. There may be cases in which such spaces would be needed to preserve the original tokenization, but it is not clear whether the result of stringization needs to produce something that would lex to the same tokens.
See also issue 2522.
History | |||
---|---|---|---|
Date | User | Action | Args |
2013-05-03 00:00:00 | admin | set | messages: + msg4363 |
2013-02-18 00:00:00 | admin | create |