newsGnuCOBOL (formerly OpenCOBOL) - News

 
 

Release of GnuCOBOL 3.1.2

Item posted by Simon Sobisch <mensch> on Tue 05 Jan 2021 06:24:20 PM UTC.

New GnuCOBOL features


   (note: runtime support needs additional library libxml2)

   (note: runtime support needs additional library cJSON or JSON-C)
  

   of seconds in C$SLEEP now
  

   and RM/COBOL variants

   to be turned on/off per source as desired

   Fujitsu, MicroFocus COBOL, Microsoft COBOL, RM/COBOL, CA Realia and more)

   by several compilers including Micro Focus
   This allows users to insert an external file handler while retaining
   all of the normal COBOL I/O functions with a possible callback to libcob.
   To have the compiled program call `yourfh()` for file I/O use:
   `cobc -fcallfh=yourfh`
   In turn `yourfh()` may call `EXTFH()` to use I/O functions from GnuCOBOL.
   The external file handler can also be directly invoked from COBOL, too,
   using `CALL "EXTFH"`.
    Note: Not each flag contained in the FCD3 is handled already 


   entries starting with a period or number are not resolved any more,
   periods in the external identifier are always replaced by underscore
    -> MY.FILE is resolved by DD_MY_FILE, dd_MY_FILE, MIFILE now;
   prefixes "-F " and "-D " are removed from external names;
   if filename is not absolute after translation, COB_FILE_PATH is now
   still applied;
   File name mapping now applies both to COBOL statements and CALLable
   CBL_ and C$ file routines.
  

   use of CURSOR clause in SPECIAL-NAMES for positioning on ACCEPT

   runtime configuration option COB_STRACK_TRACE

   was heavily improved and combines consecutive identical OCCURS items,
   leading to smaller dump files

   * copybook names that contain an extension aren't searched with additional
     extensions [as post-rc1-change this may be set to old behaviour by
     defining COB_MULTI_EXTENSION when building GnuCOBOL/cobc]
   * library names are now tested for environment "COB_COPY_LIB_libname",
     allowing the directory to specified externally (also as no-directory
     by exporting with empty value) and has a fallback (with a warning) to
     be effectively ignored (as previous versions did this)

Removed functions


   "LINE / COL signed-integer" (inadvertently available since 2.2/3.0rc1);
   which will now raise an error "unsigned integer expected";
   if used replace by standard "LINE / COL +/- integer"

Obsolete features

(will be removed in the next version if no explicit user requests are raised)


Changes to the COBOL compiler (cobc) options


   -f[no]-ec=exception-name to tune the exception checks similar to the >>TURN
       directive, you may also leave out the "EC-" prefix here, example to
       enable all checks but disable all bound checks but OCCURS DEPENDING ON:
       cobc -debug -fno-ec=bound -fec=bound-odo

   -Wextra "new" option to enable every possible warning that is not dialect
       specific (this option used to be called -W)
   -Wadditional  new warning group for all warnings that don't have a group
       on their own
   -Wno-error and -Wno-error=<warning> to treat (specific <warning>s) not as error
   -Wdangling-text for raising the warning "source text after program area",
       not included in -Wall any more
   -Wno-ignored-error allows to suppress messages that normally would be an
       error and are only allowed because they are never executed
   -Wcorresponding is now enabled by default

   -f[no]-diagnostics-show-option, enabled by default, shows the
    command line option responsible for the diagnostic message

   extra information to a warning (or error) is now marked as "note:"

   now and includes the total amount of direct references

   ascending order now

   debugging options available on the system

   all ENTRY and SECTION elements to ease source level debugging
  


Changes in the COBOL runtime (libcob)


   To prevent this disable translations in general with using the configure
   option --disable-nls (or by deactivating ENABLE_NLS in config.h).

   against libcob and need cob_decimal include gmp.h/mpir.h yourself before;
   otherwise you do not need it in your include path any more


   were added, see new C-API documentation


   (by CBL_ERROR_PROC) were ignored. This was changed according to the
   documentation for CBL_ERROR_PROC -> a RETURN-VALUE of ZERO skips further
   error handlers to be called, including the internal one.


New build features


   unexpected result.

   may now be build and/or tested and/or the test results checked separately.
   You now may also run the tests with a previous installed version of GnuCOBOL
   (or a version specified by a manual temporary setup).
   For details see tests/cobol85/README.

   library is to be used, where ARG may be: check (default), gmp, mpir

   XML runtime support, otherwise it will be included if found as working

   JSON runtime support, otherwise it will be included if found as working
   Note: As a special case you may built-in cJSON by placing its source in
   the folder "libcob". If it is included there, this version will be compiled
   into libcob. It may be enforced with --with-json=local,
   like --with-json=cjson and --with-json=json-c enforce the given library.

   GMP_CFLAGS / MPIR_CFLAGS and GMP_LIBS / MPIR_LIBS.
   If unset configure will try pkg-config.

   and XML2_LIBS. If unset configure will use pkg-config / xml2-config.

   and CJSON_LIBS, similar JSON_C_CFLAGS and JSON_C_LIBS for libjson-c.
   If unset configure will use pkg-config.

   hardening options or leave as-is, or disable (which previous versions
   effectively did)

   provided defines are now found in the single header config.h

   uninstalled binaries. Samples:
   pre-inst-env cobc -xj prog.cob
   pre-inst-env cobcrun -M prog start
   pre-inst-env may also be called without parameters to start a new shell
   session with the environment adjusted to use the uninstalled version.


General


  includes the following CVEs:
 
   compiler (may be triggered with special crafted source files)
   CVE-2019-14468, CVE-2019-14486, CVE-2019-14528, CVE-2019-14541,
   CVE-2019-16396, CVE-2019-16395

  if set to any value the option parsing in cobc, cobcrun and CBL_GC_GETOPT
  stops at the first nonoption, otherwise it stays with the old behaviour and
  re-orders nonoptions to the end)

Known issues in 3.1


  * 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)

   as expected in all cases

   (especially when using a different compiler than GCC)
    * function with variable-length RETURNING item
    * USAGE POINTER, which may need to be manually aligned

Back to the top

Powered by Savane 3.13-3230.
Corresponding source code