Skip to content

Commit

Permalink
Merge SVN 5065, 5066
Browse files Browse the repository at this point in the history
  • Loading branch information
ddeclerck committed Nov 20, 2024
1 parent 4dd8c84 commit 330a1c7
Show file tree
Hide file tree
Showing 11 changed files with 452 additions and 333 deletions.
19 changes: 19 additions & 0 deletions cobc/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,25 @@

* cobc.c: disable unreached code removement with -O0, but keep it
unchanged for -g
* field.c (validate_field_1): moved check for duplicate report LINE and
"OCCURS with multi COLUMNs" here, originally found in (compute_size)
* field.c (get_max_int_val): new function to get the highest algebraic
integer value
* field.c (compute_size): limit internal computed maximum for UNBOUNDED
item to the maximum value that can be stored in its DEPENDING on item
* field.c (compute_size): set items that are too big to a fixed value
to return eraly on follow-up checks
* field.c (compute_size): disabled check for missing PIC for NATIONAL
and BCD USAGE
* tree.c (cb_field_variable_address), tree.h: disabled unused function
* tree.c (cb_field_has_unbounded), tree.h: new function checking both
field and any of the child elements to be UNBOUNDED
* typeck.c (cb_validate_program_data): validate DEPENDING ON to be numeric
* typeck.c (cb_build_identifier): skip compile-time checks for ref-mod
on UNBOUNDED items as size is not known
* parser.y (occurs_clause): don't set flag_unbounded in parent
* cobc.c (print_fields): don't output (wrong) size for group items with
OCCURS UNBOUNDED sub-fields

2023-05-23 Simon Sobisch <[email protected]>

Expand Down
4 changes: 2 additions & 2 deletions cobc/cobc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5664,7 +5664,7 @@ print_fields (struct cb_field *top, int *found)
/* group never has a PICTURE ... */
got_picture = 0;
} else {
/* ...stilll output definitions for TYPEDEF / SAME AS */
/* ...still output definitions for TYPEDEF / SAME AS */
got_picture = set_picture (top, picture, picture_len);
}
} else {
Expand All @@ -5675,7 +5675,7 @@ print_fields (struct cb_field *top, int *found)
got_picture = set_picture (top, picture, picture_len);
}

if (top->flag_any_length || top->flag_unbounded) {
if (top->flag_any_length || cb_field_has_unbounded (top)) {
pd_off = sprintf (print_data, "????? ");
} else if (top->flag_occurs && !got_picture) {
pd_off = sprintf (print_data, "%05d ", top->size * top->occurs_max);
Expand Down
Loading

0 comments on commit 330a1c7

Please sign in to comment.