------- Additional Comments From jsm28 at gcc dot gnu dot org 2005-03-12 11:14 ------- Another reason why spelling needs preserving (in addition to implementing # correctly) is for the constraints on duplicate macro definitions.
#define foo \u00c1 #define foo \u00C1 is invalid (different spelling in replacement), as is #define bar(\u00c1) #define bar(\u00C1) (different spelling of parameter names). However, #define \u00c1 foo #define \u00C1 foo is valid, since the spelling of the macro *name* doesn't need to be the same. It is true that we don't get the constraints on duplicate macro definitions right in all cases at present (bug 20078), but since spelling of identifiers needs preserving anyway for the # operator this seems no reason not to get this case right (with testcases, of course). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9449