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