Skip to content

Commit

Permalink
Merge branch 'gnucobol-3.x' into gcos4gnucobol-3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
lefessan committed Jul 26, 2023
2 parents 6b44051 + bc1d6c9 commit 0ab36fd
Show file tree
Hide file tree
Showing 36 changed files with 1,853 additions and 707 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

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

* configure.ac: fix for resolving COBCRUN_NAME

2023-05-25 Chuck Haatvedt <[email protected]>

* configure.ac: added test for HAVE_RESIZE_TERM function
Expand Down
23 changes: 17 additions & 6 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ NEWS - user visible changes -*- outline -*-

GnuCOBOL 3.2rc1 (20230118)
GnuCOBOL 3.2rc2 (20230210)
GnuCOBOL 3.2rc3 ASAP
3.2 final (depending on feedback) around 2023/04/25
GnuCOBOL 3.2 to be done end of July 2023

planned for final:
* extending testsuite and documentation
Expand Down Expand Up @@ -300,7 +299,8 @@ NEWS - user visible changes -*- outline -*-
of internal memory used during CALL; this can help in finding otherwise
hard to diagnose overwrite of memory and as it is only done on CALL
has a much smaller footprint than -fec=bounds (as both check different
aspects at different places it is also reasonable to use both)
aspects at different places it is also reasonable to use both);
to disable it use -fmemory-check=none or limit by -fmemory-check=pointer

** the option -g does no longer imply -fno-remove-unreachable; if you want to
keep those in you need to explicit specify this
Expand All @@ -316,6 +316,9 @@ NEWS - user visible changes -*- outline -*-
** adjustments to warning options:
-Wconstant-expression was changed to a group warning and includes
the new, previously integrated, -Wconstant-numlit-expression
-Wtyping as a new warning raises only very suspicious MOVEs,
-Wstrict-typing, which will warn as before even for MOVE 1 TO PICX-FLD
is not included in -Wall any more
-Wlarger-01-redefines as new warning (enabled by -Wextra) to check for
the only larger REDEFINES that is explicit allowed by the COBOL standard
-Wno-unsupported -Wunsupported new option to disable or only warn
Expand All @@ -328,6 +331,8 @@ NEWS - user visible changes -*- outline -*-
a coding error
-Wsuspicious-perform-thru (enabled by default) to check for PERFORM ranges
that are likely to create unwanted behaviour
-Wother now warns for suspicious reference-modification which is likely to
create out-of-bounds access at runtime

** new compiler command line option to list the known runtime exception names
and fatality `cobc --list-exceptions`
Expand Down Expand Up @@ -418,8 +423,12 @@ NEWS - user visible changes -*- outline -*-

* More notable changes

** in 64-bit environments, the maximum field size was increased from
268435456 bytes (999999998 bytes for OCCURS UNBOUNDED) to 2 GB
** in general, the maximum field size in LINKAGE SECTION was increased from
268435456 bytes (999999998 bytes for OCCURS UNBOUNDED) to the system
specific INT_MAX - 1, which is commonly 2 GB

** in 64-bit environments, the maximum field size outside of LINKAGE SECTION
was increased from 268435456 bytes to 2 GB

** numeric DISPLAY can store and may contain a positive zero after arithmetic,
PACKED-DECIMAL may contain negative zero (x'0D') after arithmetic; as before
Expand Down Expand Up @@ -531,9 +540,11 @@ NEWS - user visible changes -*- outline -*-
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 variabe and use
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
11 changes: 8 additions & 3 deletions bin/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@

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

* cob-config.in: prevent warning to use datadir, but not datarootdir;
allow abbreviated commands (blatantly copied from configure script)

2023-07-01 Fabrice Le Fessant <[email protected]>

* cob-config: echo in same order as arguments. Add missing
arguments (--bindir,--libdir,--datadir,--mandir,--includedir)
* cob-config.in: echo in same order as arguments; add missing
arguments (--bindir,--libdir,--datadir,--mandir,--includedir)

2022-10-18 Simon Sobisch <[email protected]>

Expand Down Expand Up @@ -282,7 +287,7 @@
then you can switch easily.


Copyright 2004-2008,2010,2012,2014-2022 Free Software Foundation, Inc.
Copyright 2004-2008,2010,2012,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.
43 changes: 28 additions & 15 deletions bin/cob-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#
# cob-config
#
# Copyright (C) 2003-2012, 2020 Free Software Foundation, Inc.
# Written by Keisuke Nishida, Roger While
# Copyright (C) 2003-2012, 2020, 2023 Free Software Foundation, Inc.
# Written by Keisuke Nishida, Roger While, Simon Sobisch, Fabrice Le Fessant
#
# This file is part of GnuCOBOL.
#
Expand All @@ -27,6 +27,7 @@ exec_prefix_set=no
libdir=@libdir@
includedir=@includedir@
bindir=@bindir@
datarootdir=@datarootdir@
datadir=@datadir@
includedir=@includedir@
mandir=@mandir@
Expand All @@ -43,6 +44,8 @@ usage()
cat <<EOF
Usage: $me [options]
echos configuration variables of ${THIS}.
Options:
--prefix echos the package-prefix of ${THIS}
--exec-prefix echos the executable-prefix of ${THIS}
Expand All @@ -53,6 +56,7 @@ Options:
--version echos the release+patchdate version of ${THIS}
--bindir echos the directory containing ${THIS} programs
--datarootdir echos the data root for ${THIS}
--datadir echos the directory containing ${THIS} data
--includedir echos the directory containing ${THIS} header files
--libdir echos the directory containing ${THIS} libraries
Expand All @@ -74,47 +78,56 @@ while test $# -gt 0; do
esac

case $1 in
--prefix=*)
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
prefix=$optarg
if test $exec_prefix_set = no ; then
exec_prefix=$optarg
fi
;;
--exec-prefix=*)
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
exec_prefix=$optarg
exec_prefix_set=yes
;;
--prefix)
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
echo ${prefix}
;;
--exec-prefix)
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
| --exec | --exe | --ex)
echo ${exec_prefix}
;;
--version)
-version | --version | --versio | --versi | --vers | -V)
echo ${version}
;;
--cflags)
-cflags | --cflags | --cflag | --cfla | --cfl | --cf | --c | -c)
echo ${cflags}
;;
--libs)
-libs | --libs | --lib | --li | --l | -l)
echo ${libs}
;;
--bindir)
-bindir | --bindir | --bindi | --bind | --bin | --bi)
echo ${bindir}
;;
--datadir)
-datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
| --dataroo | --dataro | --datar)
echo ${datarootdir}
;;
-datadir | --datadir | --datadi | --datad)
echo ${datadir}
;;
--includedir)
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
echo ${includedir}
;;
--libdir)
-libdir | --libdir | --libdi | --libd)
echo ${libdir}
;;
--mandir)
-mandir | --mandir | --mandi | --mand | --man | --ma | --m | -m)
echo ${mandir}
;;
--help)
-help | --help | --hel | --he | -h)
cat <<EOF
This is a shell script which simplifies configuring applications
against a particular version of the GnuCOBOL library.
Expand Down
100 changes: 95 additions & 5 deletions cobc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,9 +1,77 @@

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

* parser.y (entry_statement): don't check parameter address
directly on ENTRY, because it just assigns it
* codegen.c (output_internal_function, output_entry_function): moved
setting of non-passed parameters to NULL to entry function as we only
have ordinal CALL numbers available there; set BY VALUE parameters to
zero instead of NULL
* codegen.c (output_field_no_target): extracted to reduce code duplication
* typeck.c (cb_emit_call): fixed skipping memory-fence generation for
EXTERNAL/BASED sub-fields

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

* field.c (compute_size): inspect field storage to check for
the appropriate field size limit
* tree.h (cb_field): new flag_above_unbounded
* tree.c (cb_field_has_unbounded), tree.h: removed; use
flag_above_unbounded in callers (typeck.c, cobc.c) instead
* parser.y (occurs_clause): set flag_above_unbounded in parents

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

* typeck.c (refmod_checks): fixed ec-bound-refmod checks for UNBOUNDED
* field.c (compute_size): take fields before the UNBOUNDED field into
account when calculating its maximum elements;
fix compiler crash if DEPENDING field does not exist
* parser.y (validated_field_reference): extracted from (identifier_field)
and used in all places with the exact same code

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

* field.c (copy_validation): new function
* field.c (copy_validation, copy_into_field): handling validation
* cobc.c (print_fields): leave a hint to field being TYPEDEF
* cobc.c (xref_fields): dont output references for TYPEDEF sub items

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

* typeck.c (refmod_checks): extracted from (cb_build_identifier)
* typeck.c (refmod_checks): prevent condition-names to be reference-modified
* parser.y (class_value): improved error messages
* tree.c (cb_build_cast): set numeric category for all integer casts

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

* typeck.c (cb_build_identifier): allow ref-mod up to identifier length
* typeck.c (cb_build_identifier): new warning for suspicious reference-
modification with start or length set to maximum and the other to var
* typeck.c (cb_build_move_literal): optimize to cb_build_move_num_zero in
more cases

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

* pplex.l (cb_ppecho_direct, output_pending_newlines): output only up
to 9 empty lines, for more empty lines in the preparsed output file
generate a matching #line directive, this saves both space and serves
as a workaround for an unclear scanner bug that may happen with huge
amounts of empty lines
* pplex.l (switch_to_buffer): don't re-strdup the filename
* parser.y (emit_statement): changed from define to inline function
* codegen.c: complete output of program's end source location if requested
* scanner.l: handle line directive in any state
* warning.def, typeck.c (validate_move), cobc.c (process_command_line):
* use existing -Wstrict-typing only for "strict" type mismatches, including
"same size, different type" and move it to -Wextra; the other mismatches
are still raised with -Wall but under the new -Wtyping

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

* parser.y: fix code generation for OPEN/CLOSE with multiple
filenames, where DECLARATIVES for all arguments were called when
only one argument failed
filenames, where DECLARATIVES for all arguments were called when
only one argument failed

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

Expand Down Expand Up @@ -192,6 +260,8 @@
2023-05-30 Simon Sobisch <[email protected]>

* typeck.y (is_subordinate_to): start with parent, not field
* field.c (copy_into_field_recursive, copy_into_field): handling more
field attributes, don't re-build picture

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

Expand All @@ -202,6 +272,11 @@

* parser.y, reserved.c: added RIGHTLINE - GC extension matching LEFLINE
* parser.y: drop PENDING from OVERLINE and LEFTLINE
* tree.c (cb_build_intrinsic): refactored to get the name in a single place
* field.c (create_implicit_picture): don't imply a size if the source for
VALUE is an intrinsic function or compile-time constant
* field.c (create_implicit_picture): don't stop on errors but still create
an implied PIC to allow more checks later

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

Expand Down Expand Up @@ -234,13 +309,24 @@
literal for use with CONTROL phrase
* parser.y: adjust a bunch of terminals to match the internal name with
leading underscore as optional
* cobc.c: check for duplicate source file and skip with warning
* pplex.l: check for recursive file by resolved file name

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

* parser.y (usage), field.c (validate_field_1): postpone setting of
field attribute flag_is_pointer from parsing the USAGE clause to final
field validation, fixing group and "child" USAGE, as well as
TYPEDEF + SAME AS with pointer types

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

* cobc.c (set_category, set_category_from_usage): changed argument types
from int to their matching enum
* tree.c (cb_build_prototype), parser.y (setup_prototype),
tree.h (struct cb_prototype): use matching enum
* tree.c (cb_field), parser.y, reserved.c: added parsing of GROUP-USAGE
* field.c (validate_field_1): handle new attribute group_usage

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

Expand Down Expand Up @@ -305,6 +391,11 @@
* typeck.c (cb_build_move_literal): optimized output for literals to
fields with BLANK WHEN ZERO and SIGN LEADING

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

* field.c: inclusion of condition-names (level 88) into field that use a
TYPEDEF defintion

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

* codegen.c (output_so_load_version_check): new function to generate
Expand Down Expand Up @@ -516,8 +607,6 @@

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

* field.c (copy_into_field, copy_into_field_recursive): fix missing set
of flag_is_pointer, fixing TYPEDEF + SAME AS with pointer types
* parser.y, reserved.c: add DISPLAY-1 as PENDING,
actually pass NATIONAL usage if specified
* field.c (compute_size), tree.c (cb_tree_type): handle CB_USAGE_NATIONAL
Expand Down Expand Up @@ -2278,7 +2367,8 @@

2020-09-27 Bob Dubner <[email protected]>

* codegen.c (output_cobol_info): emit doubled backslashes for source file
* codegen.c (output_cobol_info): emit doubled backslashes for source file,
fixing bug #698 problem with #line directives

2020-09-22 James K. Lowden <[email protected]>

Expand Down
Loading

0 comments on commit 0ab36fd

Please sign in to comment.