Skip to content

Commit

Permalink
Merge branch 'gcos4gnucobol-3.x' into z-2023-07-15-deps
Browse files Browse the repository at this point in the history
  • Loading branch information
GitMensch authored Feb 20, 2024
2 parents 21dd177 + db7db96 commit 029378b
Show file tree
Hide file tree
Showing 60 changed files with 24,614 additions and 20,419 deletions.
9 changes: 9 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@

2023-10-17 David Declerck <[email protected]>

* configure.ac: add checks to allow using stdint.h and inttypes.h

2023-08-22 Simon Sobisch <[email protected]>

* configure.ac: add -fstack-clash-protection to --enable-hardening[=no]

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

* configure.ac, NEWS: updated for 3.2
* configure.ac: check for mousemask and mmask_t

2023-07-24 Simon Sobisch <[email protected]>
Expand Down
144 changes: 97 additions & 47 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,101 @@
NEWS - user visible changes -*- outline -*-

GnuCOBOL 3.3 (planned January 2023)

work in progress

* New GnuCOBOL features

** cobc now checks for binary files and early exit parsing those;
the error output for format errors (for example invalid indicator column)
is now limitted to 5 per source file

more work in progress

* Important Bugfixes

** #904: MOVE PACKED-DECIMAL unsigned to signed led to bad sign
** Padding bytes of BCD may store a non-truncated digit; while
this has no effect on calculations it can create problems on
later binary comparison of the field as well as on group MOVEs
** #918: COB_LS_VALIDATE (io status 09 and 71) partial broken

* Changes to the COBOL compiler (cobc) options:

** New option --copy COPYBOOK to load copybooks before parsing files. This
option can typically be used to perform replacements without modifying
the source code, or to add prototypes for external calls.

** New option --include FILE.h to add a #include in the generated C file.
This option can typically be used to force the C compiler to check static
calls to externals. The files are put into quotes, unless they start by
'<'. Quoted files are expected to have absolute paths, as the C compiler
is called in a temp directory instead of the project directory.

** output of unlimited errors may be requested by -fmax-errors=0,
to stop compiliation at first error use -Wfatal-errors
** default value for -fmax-errors was changed from 128 to 20

** New option -fdiagnostics-absolute-paths to print the full path of
a file for diagnostics; this flag can be activated if your editor and
build system do not correctly work together to locate files from
diagnostic output

* More notable changes

** execution times were significantly reduced for the following:
comparison between a numeric DISPLAY variable to another or to a literal
comparison between numeric DISPLAY or BCD variable to zero
INSPECT CONVERTING (and "simple" INSPECT REPLACING), in general
and especially if both from and to are constants

* Known issues in 3.x

** testsuite:
* if built with vbisam, cisam or disam, depending on the version used, some
tests will lead to UNEXPECTED PASS, while others may fail
* possibly failing tests (false positives):
* temporary path invalid
* compiler outputs (assembler)
* compile from stdin
* NIST: OBNC1M.CBL false positive (the test runner uses a nonportable way of
emulating a program kill)
* if build with -fsanitize, then some tests will fail; while we accept patches
to improve that, we don't consider the failing tests as bug in GnuCOBOL

** the recent additions of ">> TURN" and "variable LIKE variable" may not work
as expected in all cases

** floating-point comparison for equality may return unexpected results as it
involves a necessary tolerance; you may adjust the default tolerance of
0.0000001 by compiling GnuCOBOL for example with
LIBCOB_CPPFLAGS="-DCOB_FLOAT_DELTA=0.0000000000001";
we seek input for a reasonable default for GnuCOBOL 4 (use the mailing list
or discussion board to share your comments on this topic, keeping in mind
that this has to take both mathematical and "C compiler portability" into
account)

** variables containing PICTURE symbol P may lead to wrong results in rare
cases (especially screenio) - please send a bug report if you catch a case;
since GC 3.2 rc3 all arithmetic operations and MOVE are believed to be
correct

** features that are known to not be portable to every environment yet
(especially when using a different compiler than GCC)
* function with variable-length RETURNING item
* USAGE POINTER, which may need to be manually aligned

** all versions of GnuCOBOL so far: EVALUATE evaluates all subjects on *each*
WHEN (the standard explicit requests a one-time evaluation of the subjects,
then comparing the value); to work around possible issues move more complex
subjects like variables with subscripts and reference-modification, as well
as calculated subjects and function calls to a temporary variable and use
this as subject for the EVALUATE

For more known issues see the bug tracker.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

GnuCOBOL 3.2 (20230728)
GnuCOBOL 3.2rc1 (20230118)
GnuCOBOL 3.2rc2 (20230210)
Expand Down Expand Up @@ -369,7 +465,7 @@ NEWS - user visible changes -*- outline -*-

** the -P flag accepts - as argument for stdout

* Important Bugfixes:
* Important Bugfixes

** for dialects other than the GnuCOBOL default different reserved "alias" words
were not usable, for example SYNCHRONIZED or COMPUTATIONAL. This was fixed
Expand Down Expand Up @@ -502,52 +598,6 @@ NEWS - user visible changes -*- outline -*-

** undocumented option -tsymbols, which was replaced by -ftsymbols in 3.0


* Known issues in 3.2 (and 3.1)

** testsuite:
* if built with vbisam, cisam or disam, depending on the version used, some
tests will lead to UNEXPECTED PASS, while others may fail
* possibly failing tests (false positives):
* temporary path invalid
* compiler outputs (assembler)
* compile from stdin
* NIST: OBNC1M.CBL false positive (the test runner uses a nonportable way of
emulating a program kill)
* if build with -fsanitize, then some tests will fail; while we accept patches
to improve that, we don't consider the failing tests as bug in GnuCOBOL

** the recent additions of ">> TURN" and "variable LIKE variable" may not work
as expected in all cases

** floating-point comparison for equality may return unexpected results as it
involves a necessary tolerance; you may adjust the default tolerance of
0.0000001 by compiling GnuCOBOL for example with
LIBCOB_CPPFLAGS="-DCOB_FLOAT_DELTA=0.0000000000001";
we seek input for a reasonable default for GnuCOBOL 4 (use the mailing list
or discussion board to share your comments on this topic, keeping in mind
that this has to take both mathematical and "C compiler portability" into
account)

** variables containing PICTURE symbol P may lead to wrong results in rare
cases (especially screenio) - please send a bug report if you catch a case;
since GC 3.2 rc3 all arithmetic operations and MOVE are believed to be
correct

** features that are known to not be portable to every environment yet
(especially when using a different compiler than GCC)
* function with variable-length RETURNING item
* USAGE POINTER, which may need to be manually aligned

** all versions of GnuCOBOL so far: EVALUATE evaluates all subjects on *each*
WHEN (the standard explicit requests a one-time evaluation of the subjects,
then comparing the value); to work around possible issues move more complex
subjects like variables with subscripts and reference-modification, as well
as calculated subjects and function calls to a temporary variable and use
this as subject for the EVALUATE

For more known issues see the bug tracker.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

GnuCOBOL 3.1.2 released (20201223)
Expand Down
2 changes: 1 addition & 1 deletion build_windows/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@
#define PACKAGE_NAME "GnuCOBOL"

/* Define to the version of this package. */
#define PACKAGE_VERSION "3.2-dev"
#define PACKAGE_VERSION "3.3-dev"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING PACKAGE_NAME " " PACKAGE_VERSION
Expand Down
107 changes: 107 additions & 0 deletions cobc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,111 @@

2023-10-12 Fabrice Le Fessant <[email protected]>

* cobc.c, codegen.c: new option --include FILE, to #include
additional files in the C generated code. Such files can be
used to statically check the number of arguments in static
calls, for example. The files are put into quotes, unless
they start by '<'. Since C files are compiled in a temp dir,
quoted files should be absolute paths. Implementing FR #176

2023-10-11 Fabrice Le Fessant <[email protected]>

* cobc.c, pplex.l: new option --copy COPYBOOK, to include a COPYBOOK
before reading the source file

2023-11-29 Fabrice Le Fessant <[email protected]>

* cobc.c (cobc_clean_up): when save-temps specifies a directory,
do not move object files and preprocess files when they were
specified as an explicit target on the command line (-E, -c)

2023-09-20 Simon Sobisch <[email protected]>

* typeck.c (cb_build_optim_cond): generate calls to new functions
for numeric zero compare for USAGE DISPLAY and PACKED, as well
as comparison between two USAGE DISPLAY or USAGE DISPLAY to literal
* typeck.c (validate_move): internally change literals like 0.00
to zero constant allowing use of optimized MOVE code

2023-10-17 David Declerck <[email protected]>

BUG #923: generated modules init/clear unused decimal constants
* codegen.c (literal_list): removal of the unused x field,
and type moved to tree.h
* tree.h (struct cb_program): new decimal_constant field
to store decimal constants used by the current program,
* codegen.c (cb_cache_program_decimal_constant): new function
that adds constants used by the current program to the new
decimal_constant field in struct cb_prog
* codegen.c (cb_lookup_literal): added the current program as
argument to cb_lookup_literal to account for different
usage contexts (parse/typecheck vs codegen)
* codegen.c (output_internal_function): iterate over
prog->decimal_constants instead of literal_cache so as to only
output decimal constants actually used by the current program
* typeck.c (decimal_expand, cb_build_cond_fields),
codegen.c (output_param) : pass current_program to cb_lookup_literal

BUG #917: segfault on decimal constant after CANCEL on subprogram
* codegen.c (codegen_internal, codegen_finalize): move declaration
of decimal constants from global storage to local storage

2023-10-02 Fabrice Le Fessant <[email protected]>

* error.c (print_error_prefix), flag.def: new flag
-fdiagnostics-absolute-paths to print the full path of
a file for diagnostics; this flag can be activated if
your editor and build system do not correctly work
together to locate files from diagnostic output

2023-09-12 Simon Sobisch <[email protected]>

* codegen.c (literal_list): removed self-reference as tree
* replace.c (ppecho_replace): now inline
* replace.c (cb_free_replace): removed setting child to zero before free
* replace.c: style adjustment

2023-09-07 Simon Sobisch <[email protected]>

* typeck.c (cb_build_converting): protoype (disabled) to pre-generate
conversion table and call new function cob_inspect_translating instead
of cob_inspect_converting if both operands are literals/alphabets

2023-09-06 Simon Sobisch <[email protected]>

* typeck.c (validate_inspect): check for identical operands,
check for invalid combination of operands
* typeck.c (cb_build_converting): shortcut when identical operands
are used
* tree.h: change alphabet_target and alphabet_type from defines to enums

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

FR #443: error handling for non-cobol "sources"
* pplex.l (ppopen_get_file): test for binary file and directly error out
* cobc.c (cobc_terminate_exit), cobc.h: split cobc_terminate and make
the new function available
* pplex.l: check for format errors per file and skip format related
warnings if the file reached a max. of 5 such errors
* error.c, cobc.c (print_program_trailer), flag.def:
implemented -fmax-errors=0 as unlimited
* flag.def (max_errors): reduced default from 128 to 20
* config.c (cb_load_conf), error.c (configuration_error): count missing
definitions as single error
* cobc.c (process_command_line): passing -O0 by defaut for -g as some
C compilers raise warnings otherwise, breaking the testsuite

2023-08-25 Simon Sobisch <[email protected]>

* codeoptim.c (cob_gen_optim): fixed to actually skip leading zeros
for COB_GET_NUMDISP and COB_GET_NUMDISPS

2023-08-22 Simon Sobisch <[email protected]>

* typeck.c (emit_definition_note): renamed from warning_destination
* typeck.c (emit_definition_note), tree.h (cb_field): prevent output
of the same field multiple times by new flag_had_definition_note

2023-08-17 Fabrice Le Fessant <[email protected]>

* cobc.c: add new flags to output dependencies following gcc: -M to
Expand Down
Loading

0 comments on commit 029378b

Please sign in to comment.