The following code is incorrectly rejected by GCC: #define STR(X)#X int main(){ STR(0'$); } C23 optionally allows implementations to support dollar signs in identifiers, by saying: > It is implementation-defined if a $ (U+0024, DOLLAR SIGN) may be used as a nondigit character. Section 6.4.2.1 "General" Paragraph 2 ISO/IEC 9899:2024 The definition of pp-number refers to nondigit when defining digit separators, so this should also apply there. MSVC accepts this code, Clang does not. Though Clang also doesn't accept 0$, which is surely a bug. I think it also worth mentioning, the definitions of nan(...) in strtod, wcstod, etc. refer to nondigit hence nan($) should presumably be accepted. Though that seems more like a bug than the intended behavior. The requirements of a unique mapping in include directives also mention it, probably unintended though I don't think any implementations would violate that because of needing to support dollar signs.