This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: UCNs-in-IDs patch
On Sun, 13 Mar 2005, Zack Weinberg wrote:
> Mark Mitchell <mark@codesourcery.com> writes:
>
> >> Incomplete patches like this which break things and don't implement
> >> required features such as warnings for identifiers not in NFKC can
> >> go on branches
> >
> > Completely agreed.
>
> A possible alternative to pushing this onto a branch would be to leave
> it on mainline but #ifdefed out, with a configure switch to turn it
> back on. This would allow Geoff to add the missing components
> incrementally, without having to deal with the additional overhead of
> maintaining a branch. Once it's completed to everyone's satisfaction,
> the #ifdefs and configure switch could be removed.
If you believe on reviewing the patch in detail that one or a handful of
#ifdefs to prevent UCNs in identifiers from being lexed by default will
restore the previous behavior by rendering the other code handling UCNs in
identifiers dead by default, that would be reasonable. (The code seems
too wide-ranging to put #ifdefs on all of it, but simply stopping \ and
extended characters from being considered in identifiers might suffice.)
The testcases would still need disabling in the absence of this configure
option (except for those which don't involve UCNs in identifiers but just
look like they might, which weren't included in the original patch anyway
- e.g. testing that the greedy lexing algorithm applies and that UCNs
aren't treated as such in identifiers in C90 - and those which should work
whether or not UCNs in identifiers are handled as such, e.g. the first
case in bug 9449 comment 39 (rejection of duplicate macro expansions with
different UCNs for same character) or double stringizing of UCNs in C++).
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
jsm@polyomino.org.uk (personal mail)
joseph@codesourcery.com (CodeSourcery mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)