------- Additional Comments From joseph at codesourcery dot com 2005-09-15 22:53 ------- Subject: Re: UCNs not recognized in identifiers (c++/c99)
On Thu, 15 Sep 2005, geoffk at gcc dot gnu dot org wrote: > ------- Additional Comments From geoffk at gcc dot gnu dot org 2005-09-15 > 22:34 ------- > (In reply to comment #39) > > 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 > > We discussed this on the list and decided that this was probably a defect in > the C standard, since the > Rationale says that the kind of implementation we have now is supposed to be > permitted, and jsm said > he'd file a DR. How's that going? I don't believe I said I'd file a DR unless I saw a defect. There is no defect because models A or C need to be implemented by an implementation-defined mapping (documented as such; we don't even document the removal of trailing whitespace from lines; of course anything replacing UCNs with the characters they designate only in certain places is a pain to document because it doesn't fit in with the C model of phases of translation). Doug Gwyn's reading in reflector message 10751, Yes, "spelling" is meant in terms of the source code characters. The idea is to permit simple strcmp-like checking by the preprocessor. seems fine to me - implementations permitting the above in the input source must end up with the source looking different from the above after phase 1. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9449