public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "joseph at codesourcery dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/94990] NFC / NFD in identifiers
Date: Thu, 07 May 2020 23:08:58 +0000	[thread overview]
Message-ID: <bug-94990-4-1KNJgSTw7B@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94990-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94990

--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
Note that ISO C references ISO 10646, not Unicode, so normalization forms 
are not part of the C notion of identifier characters and differently 
normalized forms are different identifiers as far as C is concerned.

The reason the -Wnormalized= options prefer NFC and don't have an option 
-Wnormalized=nfd is that many characters were only valid in C99 in the 
precomposed forms (C11 added more combining characters to the set allowed 
in identifiers).  Any Unicode character sequence can of course be 
converted to an NFC form if desired; some characters there may use 
precomposed forms and some may use combining characters.

If you wish to use NFD in your code, you should probably set your editor 
to generate NFD source files and compile with -Wno-normalized.

(A separate issue is that the Unicode data used in GCC for -Wnormalized= 
was last updated in 2013 and needs updating to a newer version of Unicode.  
Since the update I did in 2013 introduced automated generation of the 
relevant code from Unicode data, such an update to use newer Unicode data 
should be straightforward.)

      reply	other threads:[~2020-05-07 23:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-07 22:54 [Bug c/94990] New: " Arfrever.FTA at GMail dot Com
2020-05-07 23:08 ` joseph at codesourcery dot com [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-94990-4-1KNJgSTw7B@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).