Skip to content

Commit 5de4543

Browse files
edgcpp-changelog-bot[bot]unknown
authored andcommitted
Handle Unicode 18 Jurchen and Small Seal ranges [GH #391]
e
1 parent ee3b38e commit 5de4543

7 files changed

Lines changed: 69403 additions & 67820 deletions

File tree

‎dev_tools/cpp_tools/process_unicode_names/main.cpp‎

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ machine for recognizing a Unicode character name and determining its
1111
associated code point. The input data is taken from two files. The first
1212
is assumed to be in the form of the file
1313
14-
https://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt
14+
https://www.unicode.org/Public/18.0.0/ucd/UnicodeData.txt
1515
1616
where each line consists of
1717
@@ -28,12 +28,13 @@ category define a range of characters, e.g.,
2828
4E00;<CJK Ideograph, First>;...
2929
9FFF;<CJK Ideograph, Last>;...
3030
31-
Characters in the ranges for the CJK and Tangut ideographs, along with the
32-
Hangul syllables, are also added to the machine.
31+
Characters in the ranges for the CJK and Tangut ideographs and for the
32+
Jurchen and Small Seal characters, along with the Hangul syllables, are also
33+
added.
3334
3435
The second file is assumed to be in the form of the file
3536
36-
https://www.unicode.org/Public/UCD/latest/ucd/NameAliases.txt
37+
https://www.unicode.org/Public/18.0.0/ucd/NameAliases.txt
3738
3839
which consists of empty lines, comment lines beginning with '#', and data
3940
lines of the form
@@ -352,7 +353,7 @@ semicolon is encountered, report an error and exit.
352353
Definitions related to the algorithmic generation of character names for
353354
the Hangul Syllable block. The data and algorithm reflect those of the
354355
Hangul Character Name Generation pseudocode found in section 3.12 of
355-
www.unicode.org/versions/Unicode15.1.0/ch03.pdf.
356+
www.unicode.org/versions/Unicode18.0.0/core-spec/chapter-3/.
356357
*/
357358

358359
#define Hangul_LCount 19 // Number of leading Jamo consonants
@@ -498,6 +499,18 @@ solely of data lines, no blank lines and no comments.
498499
static const char Tangut_prefix[] = "TANGUT IDEOGRAPH-";
499500
add_name_and_code_points(code_point, ending_point, Tangut_prefix,
500501
Tangut_prefix + sizeof(Tangut_prefix));
502+
} else if (p[2] == 'J' &&
503+
strncmp(p + 2, "Jurchen Character",
504+
sizeof("Jurchen Character") - 1) == 0) {
505+
static const char Jurchen_prefix[] = "JURCHEN CHARACTER-";
506+
add_name_and_code_points(code_point, ending_point, Jurchen_prefix,
507+
Jurchen_prefix + sizeof(Jurchen_prefix));
508+
} else if (p[2] == 'S' &&
509+
strncmp(p + 2, "Seal Character",
510+
sizeof("Seal Character") - 1) == 0) {
511+
static const char Seal_prefix[] = "SMALL SEAL CHARACTER-";
512+
add_name_and_code_points(code_point, ending_point, Seal_prefix,
513+
Seal_prefix + sizeof(Seal_prefix));
501514
} /* if */
502515
} /* if */
503516
} else {
@@ -949,7 +962,7 @@ const char *header_text[] = {
949962
" 0x23 /",
950963
"*/",
951964
"",
952-
"unsigned char unicode_name_fsm[] = {",
965+
"extern const unsigned char unicode_name_fsm[] = {",
953966
"",
954967
"/* The following table is created by a tool that processes the Unicode data",
955968
" files and is not intended to be edited manually. This table reflects"
@@ -959,7 +972,7 @@ const char *header_text[] = {
959972
const char *footer_text[] = {
960973
"}; /* unicode_name_fsm */",
961974
"",
962-
"sizeof_t size_of_unicode_name_fsm = sizeof(unicode_name_fsm);",
975+
"extern const sizeof_t size_of_unicode_name_fsm = sizeof(unicode_name_fsm);",
963976
"",
964977
"/* Conditionally close the \"edg\" namespace. */",
965978
"END_EDG_NAMESPACE",

‎pending_changes/gh-391-unicode.txt‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[GH #391]
2+
Handle Unicode 18 Jurchen and Small Seal ranges

‎src/Changes‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
Version 7.1
22

3+
10/31/26 [GH #106]
4+
C++26: returning a reference bound to a temporary is not allowed
5+
6+
A return statement that binds the returned reference to a temporary is not
7+
allowed in C++26 (P2748). The front end only issued a warning. It is now an
8+
error in C++26 (still a warning when emulating GCC versions before 14 or
9+
Clang versions before 19, which do the same). For example, with --c++26:
10+
11+
struct S { int x; };
12+
const int& f() { return 1; } // Now an error.
13+
const int& g() { return S().x; } // Now an error.
14+
15+
Returning a reference to a member of a temporary, as in g, was previously not
16+
diagnosed at all in the standard (non-GNU, non-Clang) modes; before C++26 it
17+
now gets the same warning as the other cases. The same is true of returning
18+
a reference to an array temporary or to one of its elements (e.g.,
19+
"return A{1, 2};" or "return A{1, 2}[0];" with "using A = int[2];") in all
20+
modes. Returning a reference to a local variable is still only a warning.
21+
22+
As P2748 specifies, this does not apply to the conversion checked by
23+
std::is_convertible (e.g., __is_convertible_to(long, const int&) is still
24+
true).
25+
26+
327
10/30/26 [GH #401]
428
break and continue in GNU statement expressions in constant evaluation
529

0 commit comments

Comments
 (0)