This is a limitation of the preprocessor SDCC uses, which is based on GNU cpp 4.6.3.
I don't think it would be worth the effort to fix this in the current preprocessor: For ISO C23 support we need to replace the preprocessor anyway (possibly by one based on GNU cpp 10), which I hope we'll get around to do next winter. See [feature-requests:#466]
That would then give us support for non-ASCII characters in macros.
There is a workaround (that I've never used myself), but unless your editor support automatic conversion to escape sequences it might not be what you want: By passing -fextended-identifiers to the preprocessor, non-ASCII characters should work via \u and \U escape sequences.
This is a limitation of the preprocessor SDCC uses, which is based on GNU cpp 4.6.3.
I don't think it would be worth the effort to fix this in the current preprocessor: For ISO C23 support we need to replace the preprocessor anyway (possibly by one based on GNU cpp 10), which I hope we'll get around to do next winter. See [feature-requests:#466]
That would then give us support for non-ASCII characters in macros.
There is a workaround (that I've never used myself), but unless your editor support automatic conversion to escape sequences it might not be what you want: By passing -fextended-identifiers to the preprocessor, non-ASCII characters should work via \u and \U escape sequences.
Related
Feature Requests:
#466Last edit: Maarten Brock 2021-05-24
Depending on the exact context, chances are that you can use C constants instead of preprocessor defines.