Skip to content

Commit

Permalink
Fix for POINTER
Browse files Browse the repository at this point in the history
  • Loading branch information
rjnorman74 committed Dec 8, 2020
1 parent 4ae803b commit f9cc0db
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cobc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

2020-12-08 Ron Norman <[email protected]>

* codegen.c: emit 01/77 USAGE POINTER as 'unsigned char * xxx[1]'
so that it is properly aligned for the hardware

2020-12-07 Simon Sobisch <[email protected]>

* codegen.c (output_display_fields): prevent bad integer promotion in
Expand Down
4 changes: 4 additions & 0 deletions cobc/codegen.c
Original file line number Diff line number Diff line change
Expand Up @@ -2007,6 +2007,10 @@ output_local_base_cache (void)
} else if (blp->f->index_type == CB_STATIC_INT_INDEX) {
output_local ("static int %s%d;",
CB_PREFIX_BASE, blp->f->id);
} else if (blp->f->flag_is_pointer
&& (blp->f->level == 1 || blp->f->level == 77)) {
output_local ("static unsigned char *%s%d[1];",
CB_PREFIX_BASE, blp->f->id);
} else if( !(blp->f->report_flag & COB_REPORT_REF_EMITTED)) {
#ifdef HAVE_ATTRIBUTE_ALIGNED
output_local ("static cob_u8_t %s%d[%d]%s;",
Expand Down

0 comments on commit f9cc0db

Please sign in to comment.