public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109936] New: error: extended character ≠ is not valid in an identifier
@ 2023-05-22 19:58 adam at wozniakconsulting dot com
  2023-05-22 20:04 ` [Bug c++/109936] " pinskia at gcc dot gnu.org
                   ` (26 more replies)
  0 siblings, 27 replies; 28+ messages in thread
From: adam at wozniakconsulting dot com @ 2023-05-22 19:58 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109936
           Summary: error: extended character ≠ is not valid in an
                    identifier
           Product: gcc
           Version: 11.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: adam at wozniakconsulting dot com
  Target Milestone: ---

Created attachment 55138
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55138&action=edit
cpp file that demonstrates bug

#define X(x)
X(🤔) // emojis work
X(≠)  // this "not equal" does NOT work!

///////////////////////////////////////////
#if 0
compile with "g++ -c bad.cpp" gives:

bad.cpp:3:3: error: extended character ≠ is not valid in an identifier
    3 | X(≠)
      |   ^

compile with "g++ -c -fextended-identifiers bad.cpp" gives the same error.

g++ --version says:

g++ (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

/lib/cpp --version says:

cpp (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


manual for both gcc and cpp says:

       -fextended-identifiers
          Accept universal character names and extended characters in
          identifiers.  This option is enabled by default for C99 (and later
          C standard versions) and C++.

BTW, i get similar error with the following unicode code points.  while some
may have reasonable explanations, many do not.

0080 - 00a7
00a9
00ab - 00ac
00ae
00b0 - 00b1
00b6
00bb
00bf
00d7
00f7
0300 - 036f
1680
180e
1dc0 - 1dff
2000 - 200a
200e - 2029
202f - 203e
2041 - 2053
2055 - 205f
20d0 - 20ff
2190 - 245f
2500 - 2775
2794 - 2bff
2e00 - 2e7f
3000 - 3003
3008 - 3020
3030
e000 - f8ff
fdd0 - fdef
fe20 - fe2f
fe45 - fe46

#endif

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2023-11-24 15:41 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-22 19:58 [Bug c++/109936] New: error: extended character ≠ is not valid in an identifier adam at wozniakconsulting dot com
2023-05-22 20:04 ` [Bug c++/109936] " pinskia at gcc dot gnu.org
2023-05-22 20:06 ` pinskia at gcc dot gnu.org
2023-05-22 20:06 ` pinskia at gcc dot gnu.org
2023-05-22 20:16 ` adam at wozniakconsulting dot com
2023-05-22 20:17 ` redi at gcc dot gnu.org
2023-05-22 20:26 ` redi at gcc dot gnu.org
2023-05-22 20:29 ` pinskia at gcc dot gnu.org
2023-05-22 20:52 ` adam at wozniakconsulting dot com
2023-05-22 20:58 ` redi at gcc dot gnu.org
2023-05-22 21:14 ` schwab@linux-m68k.org
2023-05-22 21:20 ` jakub at gcc dot gnu.org
2023-05-22 23:36 ` adam at wozniakconsulting dot com
2023-05-22 23:43 ` adam at wozniakconsulting dot com
2023-05-22 23:47 ` adam at wozniakconsulting dot com
2023-05-23  0:39 ` adam at wozniakconsulting dot com
2023-05-23  1:54 ` pinskia at gcc dot gnu.org
2023-05-23  1:55 ` pinskia at gcc dot gnu.org
2023-05-23  8:01 ` schwab@linux-m68k.org
2023-05-23  9:06 ` redi at gcc dot gnu.org
2023-05-23 15:31 ` adam at wozniakconsulting dot com
2023-05-23 15:38 ` adam at wozniakconsulting dot com
2023-05-23 15:40 ` adam at wozniakconsulting dot com
2023-05-23 16:00 ` redi at gcc dot gnu.org
2023-05-23 17:23 ` adam at wozniakconsulting dot com
2023-05-23 17:36 ` joseph at codesourcery dot com
2023-05-23 18:05 ` adam at wozniakconsulting dot com
2023-11-24 15:41 ` pinskia at gcc dot gnu.org

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).