The C and C++ standards all include text to the effect that if a stringize operation fails to produce a valid string literal token, the behavior is undefined. In C++11 this is actually possible, by including a newline character in a raw string literal. But the catch-all has always been there in the standards.
Is there any other way that stringize can produce UB, where UB or an ill-formed program hasn't already happened?
I'd be interested to hear about any dialect of C or C++ whatsoever. I'm writing a preprocessor.
\n
. (Well, it's a"\\\\n"
if you're counting backslashes.) – Diploma