------- Additional Comments From joseph at codesourcery dot com 2005-09-15 23:37 ------- Subject: Re: UCNs not recognized in identifiers (c++/c99)
On Thu, 15 Sep 2005, neil at daikokuya dot co dot uk wrote: > > Yes, "spelling" is meant in terms of the source code characters. > > The idea is to permit simple strcmp-like checking by the preprocessor. > > I think this is what we will need to do to fix the # and ## and spacing > bugs in macro replacements too - base the decision upon a memcmp or > strcmp. Note that comparing macros replacements by strings means you can no longer fake a version of UCN model C (don't really rewrite UCNs in phase 1 but convert identifier spellings to UTF-8 on lexing identifiers) as now, because then the conversion to canonical form would be visible in the results of stringising them but differently spelt macro definitions would still show up as different. You'd need either to convert identifiers before producing the string form of macro replacements, or (my preference) work out how to preserve different spellings of preprocessing tokens representing the same identifier (so as to get the results of stringising right). (Comparing with strings may still be useful in order to fix the other bugs you mention.) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9449