Skip to content

Commit 126bb8f

Browse files
committed
feat(cobc): COMPUTE文の文字列チェックを独立
feat(cobc): Independent check string on COMPUTE これまで-debugオプションの一部であったCOMPUTE文中での文字列チェックをオプション化した。
1 parent d0cb68c commit 126bb8f

File tree

6 files changed

+9
-0
lines changed

6 files changed

+9
-0
lines changed

cobc/cobc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2331,6 +2331,10 @@ main (int argc, char *argv[])
23312331
if (cb_enable_check_subscript_out_of_bounds) {
23322332
CB_EXCEPTION_ENABLE (COB_EC_BOUND_SUBSCRIPT) = 1;
23332333
}
2334+
if (cb_enable_expect_compute_string_error) {
2335+
CB_EXCEPTION_ENABLE (COB_EC_DATA_INCOMPATIBLE) = 1;
2336+
}
2337+
23342338

23352339
/* Check the filename */
23362340
if (iargs == argc) {

cobc/config.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ CB_CONFIG_BOOLEAN (cb_ignore_invalid_record_contains, "ignore-invalid-record-con
6262
CB_CONFIG_BOOLEAN (cb_zero_division_error, "zero_division_error")
6363
CB_CONFIG_BOOLEAN (cb_enable_check_subscript_out_of_bounds, "enable-check-subscript-out-of-bounds")
6464
CB_CONFIG_BOOLEAN (cb_enable_expect_numeric_error, "enable-expect-numeric-error")
65+
CB_CONFIG_BOOLEAN (cb_enable_expect_compute_string_error, "enable-expect-compute-string-error")
6566
CB_CONFIG_SUPPORT (cb_author_paragraph, "author-paragraph")
6667
CB_CONFIG_SUPPORT (cb_memory_size_clause, "memory-size-clause")
6768
CB_CONFIG_SUPPORT (cb_multiple_file_tape_clause, "multiple-file-tape-clause")

config/default-en.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,4 @@ ignore-invalid-record-contains: no
150150
zero_division_error: no
151151
enable-check-subscript-out-of-bounds: yes
152152
enable-expect-numeric-error: yes
153+
enable-expect-compute-string-error: yes

config/default-jp.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,4 @@ ignore-invalid-record-contains: no
150150
zero_division_error: yes
151151
enable-check-subscript-out-of-bounds: yes
152152
enable-expect-numeric-error: yes
153+
enable-expect-compute-string-error: yes

config/default.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,4 @@ ignore-invalid-record-contains: no
150150
zero_division_error: no
151151
enable-check-subscript-out-of-bounds: no
152152
enable-expect-numeric-error: no
153+
enable-expect-compute-string-error: no

config/jp-compat.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ ignore-invalid-record-contains: yes
2525
zero_division_error: yes
2626
enable-check-subscript-out-of-bounds: yes
2727
enable-expect-numeric-error: yes
28+
enable-expect-compute-string-error: yes
2829

2930
# Value: 'any', 'fatal', 'never'
3031
abort-on-io-exception: fatal

0 commit comments

Comments
 (0)