This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/9449] UCNs not recognized in identifiers (c++/c99)
- From: "jsm28 at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Mar 2005 11:14:42 -0000
- Subject: [Bug preprocessor/9449] UCNs not recognized in identifiers (c++/c99)
- References: <20030127145600.9449.rearnsha@arm.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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