Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/gnucobol-3.x' into gcos4gnucob…
Browse files Browse the repository at this point in the history
…ol-3.x
  • Loading branch information
ddeclerck committed Jul 12, 2024
2 parents 39344cf + 73ad00d commit de6053a
Show file tree
Hide file tree
Showing 31 changed files with 2,886 additions and 743 deletions.
8 changes: 8 additions & 0 deletions cobc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@

2024-07-10 Chuck Haatvedt <[email protected]>

* tree.c (cb_build_picture): fixed currency scale counting logic

2024-06-19 David Declerck <[email protected]>

* cobc.c (process_compile): fix MSVC build command

2024-06-11 Chuck Haatvedt <[email protected]>

* tree.c (cb_build_picture): fixed currency digit counting logic

2024-05-15 Simon Sobisch <[email protected]>

* replace.c: fix compile warnings and formatting
Expand Down
10 changes: 8 additions & 2 deletions cobc/tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -3797,11 +3797,17 @@ cb_build_picture (const char *str)
category |= PIC_NUMERIC_EDITED;
if (c_count == 0) {
digits += n - 1;
c_count = n - 1;
} else {
digits += n;
c_count += n;
}
if (v_count) {
if (c_count == 0) {
scale += n - 1;
} else {
scale += n;
}
}
c_count += n;
break;
}

Expand Down
4 changes: 4 additions & 0 deletions config/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

2024-07-11 David Declerck <[email protected]>

* general: fix minor alignment / tab issues

2024-05-02 Simon Sobisch <[email protected]>

fixing bug #965
Expand Down
70 changes: 35 additions & 35 deletions config/acu-strict.conf
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ tab-width: 8
text-column: 72
word-length: 60
literal-length: 4096
numeric-literal-length: 31 # default in ACUCOBOL is 18 with the possibility to switch to 31
pic-length: 100
numeric-literal-length: 31 # default in ACUCOBOL is 18 with the possibility to switch to 31
pic-length: 100

# Enable AREACHECK by default, for reference formats other than {fixed,free}
areacheck: no #not verified yet
areacheck: no # not verified yet

# Default assign type
# Value: 'dynamic', 'external'
Expand Down Expand Up @@ -88,7 +88,7 @@ indirect-redefines: yes
# 15 - 16 15 - 16 7
# 17 - 18 17 - 18 8
#
binary-size: 1-2-4-8 # not verified yet
binary-size: 1-2-4-8 # not verified yet

# Numeric truncation according to ANSI
binary-truncate: yes
Expand All @@ -98,7 +98,7 @@ binary-truncate: yes
binary-byteorder: big-endian

# Allow larger REDEFINES items other than 01 non-external
larger-redefines: ok # not verified yet
larger-redefines: ok # not verified yet

# Allow certain syntax variations (eg. REDEFINES position)
relax-syntax-checks: yes
Expand All @@ -121,28 +121,28 @@ move-ibm: no
select-working: yes

# LOCAL-STORAGE SECTION implies RECURSIVE attribute
local-implies-recursive: no
local-implies-recursive: no

# If yes, LINKAGE SECTION items remain allocated
# between invocations.
sticky-linkage: no

# If yes, allow non-matching level numbers
relax-level-hierarchy: no # not verified yet
relax-level-hierarchy: no # not verified yet

# If yes, evaluate constant expressions at compile time
constant-folding: no

# Allow Hex 'F' for NUMERIC test of signed PACKED DECIMAL field
hostsign: no # not verified yet
hostsign: no # not verified yet

# If yes, set WITH UPDATE clause as default for ACCEPT dest-item,
# except if WITH NO UPDATE clause is used
accept-update: no # not verified yet
accept-update: no # not verified yet

# If yes, set WITH AUTO clause as default for ACCEPT dest-item,
# except if WITH TAB clause is used
accept-auto: no # not verified yet
accept-auto: no # not verified yet

# If yes, DISPLAYs and ACCEPTs are, by default, done on the CRT (i.e., using
# curses).
Expand Down Expand Up @@ -194,59 +194,59 @@ xml-parse-xmlss: no # always in COMPAT
screen-section-rules: acu

# Whether DECIMAL-POINT IS COMMA has effect in XML/JSON GENERATE
dpc-in-data: xml # verify
dpc-in-data: xml # verify

# Bounds against which to check subscripts (full, max, record)
subscript-check: max

# Functionality of JUSTIFY for INITIALIZE verb and initialization of storage
init-justify: no
init-justify: no

# Dialect features
# Value: 'ok', 'warning', 'archaic', 'obsolete', 'skip', 'ignore', 'error',
# 'unconformable'

alter-statement: obsolete
comment-paragraphs: obsolete # not verified yet
comment-paragraphs: obsolete # not verified yet
partial-replace-when-literal-src: ok
control-division: unconformable
call-overflow: ok
data-records-clause: obsolete # not verified yet
data-records-clause: obsolete # not verified yet
debugging-mode: ok
use-for-debugging: unconformable
listing-statements: skip # only available in IBM mode
title-statement: skip # not available but a reserved word in acu
listing-statements: skip # only available in IBM mode
title-statement: skip # not available but a reserved word in acu
entry-statement: ok
goto-statement-without-name: obsolete # not verified yet
label-records-clause: obsolete # not verified yet
memory-size-clause: obsolete # not verified yet
move-noninteger-to-alphanumeric: error # not verified yet
goto-statement-without-name: obsolete # not verified yet
label-records-clause: obsolete # not verified yet
memory-size-clause: obsolete # not verified yet
move-noninteger-to-alphanumeric: error # not verified yet
move-figurative-constant-to-numeric: ok
move-figurative-space-to-numeric: ok
move-figurative-quote-to-numeric: ok
multiple-file-tape-clause: obsolete # not verified yet
multiple-file-tape-clause: obsolete # not verified yet
next-sentence-phrase: ok
odo-without-to: ok # not verified yet
padding-character-clause: obsolete # not verified yet
section-segments: ignore # not verified yet
stop-literal-statement: obsolete # not verified yet
odo-without-to: ok # not verified yet
padding-character-clause: obsolete # not verified yet
section-segments: ignore # not verified yet
stop-literal-statement: obsolete # not verified yet
stop-identifier-statement: unconformable
stop-error-statement: unconformable
same-as-clause: unconformable
type-to-clause: unconformable
usage-type: unconformable
usage-type: unconformable
synchronized-clause: ok
sync-left-right: skip
special-names-clause: ok
top-level-occurs-clause: ok
value-of-clause: obsolete # not verified yet
value-of-clause: obsolete # not verified yet
numeric-boolean: unconformable
hexadecimal-boolean: unconformable
national-literals: unconformable
hexadecimal-national-literals: unconformable
national-character-literals: unconformable
# TO-DO: Add separate config option for H"..." to be unsupported,numeric,non-numeric(acu)
acu-literals: ok
acu-literals: ok
hp-octal-literals: unconformable
ebcdic-symbolic-characters: no
word-continuation: ok
Expand All @@ -258,21 +258,21 @@ constant-78: ok
constant-01: unconformable
perform-varying-without-by: unconformable
program-prototypes: unconformable
numeric-value-for-edited-item: error # not verified yet
numeric-value-for-edited-item: error # not verified yet
reference-out-of-declaratives: ok
call-convention-mnemonic: unconformable
call-convention-linkage: unconformable
using-optional: unconformable
incorrect-conf-sec-order: error
define-constant-directive: unconformable
free-redefines-position: unconformable
records-mismatch-record-clause error # not verified yet
records-mismatch-record-clause: error # not verified yet
record-delimiter: ignore
sequential-delimiters: unconformable
record-delim-with-fixed-recs: ok
missing-statement: ok # gets a warning in some places but not in PERFORM
missing-period: warning #when format not in {fixed,free}
zero-length-literals: unconformable # not verified yet
missing-statement: ok # gets a warning in some places but not in PERFORM
missing-period: warning # when format not in {fixed,free}
zero-length-literals: unconformable # not verified yet
xml-generate-extra-phrases: unconformable
continue-after: unconformable
goto-entry: unconformable
Expand All @@ -281,9 +281,9 @@ assign-using-variable: unconformable
assign-ext-dyn: ok
assign-disk-from: unconformable
vsam-status: ignore
self-call-recursive: skip
self-call-recursive: skip
record-contains-depending-clause: unconformable
defaultbyte: " "
defaultbyte: " "
picture-l: unconformable

# use fixed word list, synonyms and exceptions specified there
Expand Down
36 changes: 18 additions & 18 deletions config/bs2000-strict.conf
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ format: cobol85
tab-width: 8
text-column: 72
word-length: 31
literal-length: 180 # TO-DO: Check max hex string length is 360.
numeric-literal-length: 31 # TO-DO: Different rules for exponent-format floating-point literals.
literal-length: 180 # TO-DO: Check max hex string length is 360.
numeric-literal-length: 31 # TO-DO: Different rules for exponent-format floating-point literals.
pic-length: 50

# Enable AREACHECK by default, for reference formats other than {fixed,free}
Expand All @@ -55,7 +55,7 @@ assign-clause: external
# 4. the literal "DATAFILE"
# If no, the value of the assign clause is the file name.
#
filename-mapping: yes # probably
filename-mapping: yes # probably

# Alternate formatting of numeric fields
pretty-display: no
Expand Down Expand Up @@ -93,7 +93,7 @@ indirect-redefines: no
binary-size: 2-4-8

# Numeric truncation according to ANSI
binary-truncate: yes # TO-DO: For BINARY, *not* for COMP or COMP-5!
binary-truncate: yes # TO-DO: For BINARY, *not* for COMP or COMP-5!

# Binary byte order
# Value: 'native', 'big-endian'
Expand All @@ -114,7 +114,7 @@ ref-mod-zero-length: no
perform-osvs: no

# Compute intermediate decimal results like IBM OSVS
arithmetic-osvs: no # TO-DO: Maybe, but if intermediate item has more than 31 places, floating-point arithmetic is used.
arithmetic-osvs: no # TO-DO: Maybe, but if intermediate item has more than 31 places, floating-point arithmetic is used.

# MOVE like IBM (mvc); left to right, byte by byte
move-ibm: no
Expand All @@ -123,11 +123,11 @@ move-ibm: no
select-working: no

# LOCAL-STORAGE SECTION implies RECURSIVE attribute
local-implies-recursive: no # not verified yet
local-implies-recursive: no # not verified yet

# If yes, LINKAGE SECTION items remain allocated
# between invocations.
sticky-linkage: no # TO-DO: Check!
sticky-linkage: no # TO-DO: Check!

# If yes, allow non-matching level numbers
relax-level-hierarchy: no
Expand Down Expand Up @@ -186,7 +186,7 @@ implicit-assign-dynamic-var: no
device-mnemonics: no

# full clauses in XML PARSE - and adjusted XML-EVENTs
xml-parse-xmlss: no # only XMLPARSE"COMPAT" way
xml-parse-xmlss: no # only XMLPARSE"COMPAT" way

# What rules to apply to SCREEN SECTION items clauses
screen-section-rules: std
Expand All @@ -195,10 +195,10 @@ screen-section-rules: std
dpc-in-data: xml

# Bounds against which to check subscripts (full, max, record)
subscript-check: max # not verified, may need "record"
subscript-check: max # not verified, may need "record"

# Functionality of JUSTIFY for INITIALIZE verb and initialization of storage
init-justify: no
init-justify: no

# Dialect features
# Value: 'ok', 'warning', 'archaic', 'obsolete', 'skip', 'ignore', 'error',
Expand All @@ -207,7 +207,7 @@ init-justify: no
alter-statement: obsolete
comment-paragraphs: unconformable
control-division: unconformable
partial-replace-when-literal-src: unconformable # not verified yet
partial-replace-when-literal-src: unconformable # not verified yet
call-overflow: ok
data-records-clause: obsolete
debugging-mode: ok
Expand All @@ -232,10 +232,10 @@ stop-identifier-statement: unconformable
stop-error-statement: unconformable
same-as-clause: unconformable
type-to-clause: unconformable # TYPEDEF is reserved but unused
usage-type: unconformable
usage-type: unconformable
synchronized-clause: ok
sync-left-right: skip
special-names-clause: error # not verified yet
special-names-clause: error # not verified yet
top-level-occurs-clause: unconformable
value-of-clause: obsolete
numeric-boolean: unconformable
Expand All @@ -258,17 +258,17 @@ reference-out-of-declaratives: error
program-prototypes: unconformable
call-convention-mnemonic: unconformable
call-convention-linkage: unconformable
using-optional: unconformable
using-optional: unconformable
numeric-value-for-edited-item: error
incorrect-conf-sec-order: error
define-constant-directive: unconformable
free-redefines-position: unconformable
records-mismatch-record-clause error # not verified yet
records-mismatch-record-clause: error # not verified yet
record-delimiter: ignore
sequential-delimiters: unconformable
record-delim-with-fixed-recs: unconformable
missing-statement: warning # not verified yet
missing-period: error #when format not in {fixed,free}, not verified yet
missing-period: error # when format not in {fixed,free}, not verified yet
zero-length-literals: unconformable
xml-generate-extra-phrases: unconformable
continue-after: unconformable
Expand All @@ -278,9 +278,9 @@ assign-using-variable: ok
assign-ext-dyn: unconformable
assign-disk-from: unconformable
vsam-status: ok
self-call-recursive: skip
self-call-recursive: skip
record-contains-depending-clause: unconformable
defaultbyte: 0 # not verified yet, but likely to be as IBM
defaultbyte: 0 # not verified yet, but likely to be as IBM
picture-l: unconformable

# use fixed word list, synonyms and exceptions specified there
Expand Down
Loading

0 comments on commit de6053a

Please sign in to comment.