Skip to content

Commit 1019af6

Browse files
committed
用語 : 暫定対応として「未定義アドレス」を用語として登録 #1348
1 parent 3d65416 commit 1019af6

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

.github/workflows/script/defined_word_check.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
import re
77

88
DEFINED_WORD_LIST = [
9-
# 先頭はターゲット用語、それ以外はその用語の許可された使用方法
10-
["未定義", "未定義動作", "未定義の動作", "動作は未定義"],
9+
# ターゲット用語, その用語の許可された使用方法リスト
10+
("未定義", ["未定義動作", "未定義の動作", "動作は未定義", "未定義アドレス"]),
11+
# 「未定義アドレス」は意味が明確に規定されていない。規定されたら「未定義動作」を使用した説明に差し替える
12+
# LWG issue 3906. "Undefined address" is undefined
13+
# https://cplusplus.github.io/LWG/issue3906
1114
]
1215

1316
def check_defined_word(text: str, filename: str) -> bool:
1417
found_error: bool = False
1518

16-
for words in DEFINED_WORD_LIST:
17-
word = words[0]
18-
allow_list = words[1:]
19-
19+
for word, allow_list in DEFINED_WORD_LIST:
2020
match_list = [m.start() for m in re.finditer(word, text)]
2121
if len(match_list) == 0:
2222
continue

GLOBAL_DEFINED_WORDS.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
},
1717
"未定義動作": { "redirect": "未定義の動作", "yomi": "みていぎどうさ" },
1818
"未定義": { "redirect": "未定義の動作", "yomi": "みていぎ" },
19+
"未定義アドレス": {
20+
"yomi": "みていぎあどれす",
21+
"desc": "配列要素へのポインタがアドレス計算の結果として配列の範囲外に到達した場合に、(間接参照しなくても) 未定義動作となる"
22+
},
1923
"未規定の動作": {
2024
"link": "/implementation-compliance.md#dfn-unspecified-behavior",
2125
"yomi": "みきていのどうさ",

0 commit comments

Comments
 (0)