Skip to content

Commit

Permalink
INDEXED BY items honors defaultbyte configuration now + internal clea…
Browse files Browse the repository at this point in the history
…nup "init"

libcob/statement.def (STMT_INIT_STORAGE): new internal statement

cobc:
* parser.y (occurs_index): only set VALUE 1 for defaultbyte == INIT
* tree.h (CB_DEFAULT_BYTE_INIT, CB_DEFAULT_BYTE_NONE), config.c, field.c, codegen.c: explicit defines instead of "only magic numbers"
* tree.c (cb_build_initialize), tree.h (struct cb_initialize), codegen.c (output_initialize_to_value): replaced flag_init_statement with statement
* parser.y (setup_occurs_min_max): validate occurs_max limit (currently with COB_MAX_FIELD_SIZE)
* codegen.c
  * (output_initialize_uniform): pass code-field instead of re-evaluating it
  * (output_initialize_multi_values): removed variable "total_occurs" fixing Wunused-but-set-variable
  * (output_stmt): dropped unused msgid
* typeck.c (cb_build_index): add internal index variables in LINKAGE to internal WORKING-STORAGE or internal LOCAL-STORAGE items depending on program->flag_recursive

config/realia-strict.conf:: change defaultbyte from space to zero

configure.ac: adjusted hack for AIX 64bit OBJECT_MODE

build_windows:
* version_cobc.rc, version_libcob.rc: updated date + rev
  • Loading branch information
sf-mensch committed Jan 16, 2023
1 parent 0e58a09 commit 1cf5ca5
Show file tree
Hide file tree
Showing 27 changed files with 249 additions and 105 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

2023-01-16 Simon Sobisch <[email protected]>

* configure.ac: adjusted hack for AIX 64bit OBJECT_MODE

2023-01-14 Simon Sobisch <[email protected]>

* configure.ac: fix to use pdcurses when libcurses was verified
Expand Down
11 changes: 7 additions & 4 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,15 @@ NEWS - user visible changes -*- outline -*-
affected programs (with OCCURS DEPENDING ON) or compile with additional
-fno-odoslide to get the same results as with older GnuCOBOL versions

** the compile flag -fdefaultbyte was moved to a dialect configuration,
** the compile flag -fdefaultbyte (initializarion for data-items without
an explicit VALUE) was moved to a dialect configuration;
while -fdefaultbyte still works as before it is now implied as binary
zero with -std=ibm/mvs/bs2000, space for -std=mf/acu/rm/realia, and
zero with -std=ibm/mvs/bs2000/realia, space for -std=mf/acu/rm, and
no defined initialization for -std=cobol85/cobol2002/cobol2014/xopen,
it is unchanged for -std=default (initialize to PICTURE/USAGE)
for compatibility to previous behavior compile with -fdefaultbyte=init
it is unchanged for -std=default (initialize to PICTURE/USAGE);
for compatibility to previous behavior compile with -fdefaultbyte=init;
note that initialization for INDEXED BY items honors the defaultbyte
configuration now, too

** the dialect configuration option larger-redefines-ok was changed to
a support option larger-redefines; if specified on the command-line
Expand Down
8 changes: 6 additions & 2 deletions build_windows/ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

2023-01-16 Simon Sobisch <[email protected]>

* version_cobc.rc, version_libcob.rc: updated date + rev

2022-12-17 Simon Sobisch <[email protected]>

* general for libcob+cobc: handle move of cconv module
Expand All @@ -25,7 +29,7 @@

2021-11-06 Simon Sobisch <[email protected]>

* config.h.in: moved references to PACKACAGE_defines after the define,
* config.h.in: moved references to PACKAGE_defines after the define,
fixing dist builds since 2020-10-27
* makedist.cmd: explicit search for "define PACKAGE_define" which fixes the
multiple results
Expand Down Expand Up @@ -306,7 +310,7 @@
version_libcob.rc, version_cobcrun.rc provided by Simon)


Copyright 2014-2020 Free Software Foundation, Inc.
Copyright 2014-2023 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification, are
permitted provided the copyright notice and this notice are preserved.
6 changes: 3 additions & 3 deletions build_windows/version_cobc.rc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "config.h"

#include "../libcob/version.h"
#define VCS_REF 4776
#define VCS_REF 4935

#define STRINGIZE_DETAIL_(v) #v
#define STRINGIZE(v) STRINGIZE_DETAIL_(v)
Expand Down Expand Up @@ -44,7 +44,7 @@ VS_VERSION_INFO VERSIONINFO
VALUE "FileDescription", PACKAGE_NAME " compiler, supporting most COBOL dialects with lots of extensions"
VALUE "FileVersion", STRINGIZE(__LIBCOB_VERSION)"."STRINGIZE(__LIBCOB_VERSION_MINOR)"."STRINGIZE(__LIBCOB_VERSION_PATCHLEVEL)"."STRINGIZE(VCS_REF)
VALUE "InternalName", "cobc"
VALUE "LegalCopyright", "Copyright (C) 2001-2022 Free Software Foundation, Inc."
VALUE "LegalCopyright", "Copyright (C) 2001-2023 Free Software Foundation, Inc."
VALUE "LegalTrademarks", "Compiler: GNU General Public License v3 - see COPYING,\x0ADocumentation: GNU Free Documentation License."
VALUE "OriginalFilename", "cobc.exe"
VALUE "ProductName", PACKAGE_NAME " compiler"
Expand All @@ -55,7 +55,7 @@ VS_VERSION_INFO VERSIONINFO
VALUE "SpecialBuild", ""

/* Non-Standard entries */
VALUE "Build", "Oct 2022"
VALUE "Build", "Jan 2023"
VALUE "Developer", "Keisuke Nishida, Roger While, Ron Norman, Simon Sobisch, Edward Hart and many others (see AUTHORS and THANKS)"
VALUE "Support", "https://www.gnu.org/software/gnucobol/"
VALUE "Users", "Unlimited."
Expand Down
6 changes: 3 additions & 3 deletions build_windows/version_libcob.rc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "config.h"

#include "../libcob/version.h"
#define VCS_REF 4776
#define VCS_REF 4935

#define STRINGIZE_DETAIL_(v) #v
#define STRINGIZE(v) STRINGIZE_DETAIL_(v)
Expand Down Expand Up @@ -44,7 +44,7 @@ VS_VERSION_INFO VERSIONINFO
VALUE "FileDescription", PACKAGE_NAME " runtime, supporting most COBOL dialects with lots of extensions"
VALUE "FileVersion", STRINGIZE(__LIBCOB_VERSION)"."STRINGIZE(__LIBCOB_VERSION_MINOR)"."STRINGIZE(__LIBCOB_VERSION_PATCHLEVEL)"."STRINGIZE(VCS_REF)
VALUE "InternalName", "libcob"
VALUE "LegalCopyright", "Copyright (C) 2001-2022 Free Software Foundation, Inc."
VALUE "LegalCopyright", "Copyright (C) 2001-2023 Free Software Foundation, Inc."
VALUE "LegalTrademarks", "Runtime: GNU Lesser General Public License v3 - see COPYING.LESSER,\x0ADocumentation: GNU Free Documentation License."
VALUE "OriginalFilename", "libcob.dll"
VALUE "ProductName", PACKAGE_NAME " runtime library"
Expand All @@ -55,7 +55,7 @@ VS_VERSION_INFO VERSIONINFO
VALUE "SpecialBuild", ""

/* Non-Standard entries */
VALUE "Build", "Oct 2022"
VALUE "Build", "Jan 2023"
VALUE "Developer", "Keisuke Nishida, Roger While, Ron Norman, Simon Sobisch, Edward Hart and many others (see AUTHORS and THANKS)"
VALUE "Support", "https://www.gnu.org/software/gnucobol/"
VALUE "Users", "Unlimited."
Expand Down
17 changes: 17 additions & 0 deletions cobc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@

2023-01-16 Simon Sobisch <[email protected]>

* parser.y (occurs_index): only set VALUE 1 for defaultbyte == INIT
* tree.h (CB_DEFAULT_BYTE_INIT, CB_DEFAULT_BYTE_NONE), config.c, field.c,
codegen.c: explicit defines instead of "only magic numbers"
* tree.c (cb_build_initialize), tree.h (struct cb_initialize), codegen.c
(output_initialize_to_value): replaced flag_init_statement with statement
* parser.y (setup_occurs_min_max): validate occurs_max limit
* codegen.c (output_initialize_uniform): pass code-field instead of
re-evaluating it
* codegen.c (output_initialize_multi_values): removed variable
"total_occurs" fixing Wunused-but-set-variable
* codegen.c (output_stmt): dropped unused msgid
* typeck.c (cb_build_index): add internal index variables in LINKAGE to
internal WORKING-STORAGE or internal LOCAL-STORAGE items depending on
program->flag_recursive

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

* cobc.c, flag.def, help.c: added option --coverage internally setting
Expand Down
Loading

0 comments on commit 1cf5ca5

Please sign in to comment.