Skip to content

Commit

Permalink
cobc/codegen.c (output_init_comment_and_source_ref) [NO_INIT_SOURCE_L…
Browse files Browse the repository at this point in the history
…OC]: option to skip generating the source location in DATA DIVISION
  • Loading branch information
sf-mensch committed May 31, 2023
1 parent 13367e5 commit 2af7cc6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cobc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@

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

* codegen.c (output_init_comment_and_source_ref) [NO_INIT_SOURCE_LOC]:
option to skip generating the source location in DATA DIVISION

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

* typeck.y (is_subordinate_to): start with parent, not field

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

* parser.y: allow expressions for screen related clauses
Expand Down
5 changes: 5 additions & 0 deletions cobc/codegen.c
Original file line number Diff line number Diff line change
Expand Up @@ -5178,11 +5178,16 @@ output_init_comment_and_source_ref (struct cb_field *f)
{
/* output comment and source location for each field */
output_line ("/* initialize field %s */", f->name);
#ifndef NO_INIT_SOURCE_LOC /* allow user to not output these;
note: this will lead to a COBOL step never land in the
DATA DIVISION; it will also lead to not be able to list
copybooks in there to be visible to the debugger */
if (cb_flag_c_line_directives && f->common.source_line) {
output_cobol_info (CB_TREE (f));
output_line ("cob_nop ();");
output_c_info ();
}
#endif
}

static void
Expand Down

0 comments on commit 2af7cc6

Please sign in to comment.