Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into gc4
Browse files Browse the repository at this point in the history
  • Loading branch information
ddeclerck committed Sep 2, 2024
2 parents 30267d3 + 77a5b50 commit deb74ac
Show file tree
Hide file tree
Showing 76 changed files with 2,170 additions and 1,449 deletions.
7 changes: 5 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -1424,8 +1424,7 @@
2003-04-19 Keisuke Nishida <[email protected]>

* cob.pc.in: Removed.

* cobpp: Removed.
* cobpp: integrated into cobc (ChangeLog entries moved there)

2002-03-01 Keisuke Nishida <[email protected]>

Expand Down Expand Up @@ -1581,6 +1580,10 @@

* configure.ac, Makefile.am: Rename 'COB_LDADD' to 'COB_LIBS'

2002-05-23 Keisuke Nishida <[email protected]>

* configure.ac.c: additions for use of gettext

2002-05-19 Keisuke Nishida <[email protected]>

* Version 0.9.5 released.
Expand Down
64 changes: 42 additions & 22 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ NEWS - user visible changes -*- outline -*-
a previous version; the internal library-number was therefore increased
(libcob-5 instead of libcob-4).

*** previous versions compiled into the application module data structures
*** previous versions compiled into the application module data structures
used by the run-time library, making it extremely difficult to expand
the data structures for new functionality. An internal function calls
were added that now generate the data structures and are completely
Expand Down Expand Up @@ -129,23 +129,32 @@ Open Plans:
** Initial "testing support" of CODE-SET clause to convert between ASCII and
EBCDIC on READ/WRITE/REWRITE for sequential and line-sequential files

** minimal "parsing support" for USAGE UTF-8 and UTF-8 literals

** Support to exit the runtime from COBOL as hard error (including possible
[core-]dump and stacktrace) with "STOP ERROR" statement or by
CALL "CBL_RUNTIME_ERROR"

** COB_PHYSICAL_CANCEL may now be configured as "never" to prevent unloading,
of COBOL modules, both on CANCEL and on process exit, which is useful for
analysis tools like callgrind or perf to keep all symbols until the end of
the COBOL process

** TODO - More to document, possibly after rc-1


* Changes that potentially effects existing programs:

** ALLOCATE statement: earlier versions of GnuCOBOL initialized the memory
(to binary zero) if the INITIALIZED clause was not specified,
this isn't done anymore so if you need the memory to be initialized
specify that explicit in the source and recompile

** LINE SEQUENTIAL files, data validation: in case of non-printable data
a READ may result in status 09 and WRITE may error with status 71;
to disable this validation see the new runtime option COB_LS_VALIDATE
to restore old behavior and to increase performance on WRITE;
** LINE SEQUENTIAL files, data validation: in case of bad printable data
(less than SPACE) a READ may result in io status 09 and WRITE may error
with io status 71; see the new runtime option COB_LS_VALIDATE to disable
this validation (= old behavior) and to increase performance on line
sequential file io;
if LS_NULLS is active and invalid data (bad encoded or missing encoding)
is found io status 71 is returned

Expand Down Expand Up @@ -296,7 +305,8 @@ Open Plans:
to use this extension for other dialects use the new
-fself-call-recursive=warning (or "ok")

** the option -g does not longer imply -fsource-location
** the option -g does not longer imply -fsource-location; but it auto-includes
references to the COBOL-paragraphs to further ease source level debugging

** new flag -fstack-extended (implied with --debug and --dump) to include
the origin of entrypoints and PERFORM, this is used for the internal
Expand Down Expand Up @@ -327,6 +337,12 @@ Open Plans:
** new compiler command line option to list the known runtime exception names
and fatality `cobc --list-exceptions`

** the command line options -MT and -MF, which are used for creating a
dependency list (used copybooks) to be used for inclusion in Makefiles
or other processes, and which were removed in GnuCOBOL 2 are back in their
original version; note: their use will be adjusted where they don't match
GCC's same options in later versions, including addition of -M and -MD

** New -std options:

gcos GCOS compatibility
Expand Down Expand Up @@ -364,6 +380,9 @@ Open Plans:
longer loading time and longer compile times; if you use those a recompile
is highly suggested

** several bugs in COPY REPLACING / REPLACING were fixed along with adding
support for exensions related to REPLACING LEADING / TRAILING

* Listing changes

** the timestamp in the header was changed from ANSI date format like
Expand Down Expand Up @@ -408,15 +427,15 @@ Open Plans:

** execution times were significantly reduced for the following:
INSPECT that use big COBOL fields (multiple KB)
MOVE and comparisions (especially with enabled runtime checks, to
optimize those a re-compile is needed)
CALL data-item, and first time for each CALL
ACCEPT DATE/TIME/DAY and datetime related FUNCTIONs
MOVE with enabled runtime checks (only with re-compile)

** execution times for programs that are new generated with -fsource-location
(implied with --debug/-fec) are cut down, especially when many "simple"
statements or lot of sections/paragraphs are used; also the runtime checks
for use of LINKAGE fields and/or subscripts/reference-modification will be
much faster
runtime checks for use of LINKAGE/BASED fields and/or
subscripts/reference-modification (re-compile needed)
general: execution of programs generated with -fsource-location
(implied with --debug and -fec), especially when many "simple"
statements or lot of sections/paragraphs are used (re-compile needed)

* New build features

Expand All @@ -426,16 +445,16 @@ Open Plans:
(experimental)
** configure now checks for PERL and passes that as default to make test
** cobc handles SOURCE_DATE_EPOCH now, allowing to override timestamps in
generated code and listing files, allowing reproducible builds
generated code and listing files, allowing reproducible builds of both
GnuCOBOL (extras folder) and COBOL programs

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

** use of old non-GMP randomizer for FUNCTION RANDOM

* Known issues in 3.2 (and 3.1)

** 3.2 only: the testing and documentation for COB_CORE_ON_ERROR is unfinished
* Known issues in 3.2 (and 3.1)

** testsuite:
* if built with vbisam, cisam or disam, depending on the version used, some
Expand All @@ -451,12 +470,13 @@ Open Plans:
as expected in all cases

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

** features that are known to not be portable to every environment yet
(especially when using a different compiler than GCC)
Expand Down
51 changes: 51 additions & 0 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,11 @@ l_exit:
As a third alternative we can just add a flag that says
"assume I never go out of a section".

4.3 optimizing cob_move_display_to_edited

This function is relative often called in production systems and
re-calculates the picture on runtime, which the compiler already
did - pass this information along with the call.

5 Debugging support

Expand All @@ -185,8 +189,55 @@ access the COBOL data at debugging time.
Note: GnuCOBOL 3 implemented this partially, using extensions
near full GDB support is already possible.

GnuCOBOL 4 provides this quite complete at runtime, too.


6 Better user manual

Yes, we should, for now: refer to the GnuCOBOL Programmer's Guide
https://sourceforge.net/p/gnucobol/code/HEAD/tree/external-doc/guide/


7 Issues raised during forward-porting of 3.x patches

7.1 General issues

- Decide what to do about gcdiff, especially under MSVC

- Correctly implement delay-loading under MSVC

- Possibly drop usage of external cobxref

- Fix any remaining failed test case

- Rework the context-sensitive reserved words handling (or use a bigger type)

7.2 CHECKMEs, TODOs and #if-0'ed code

- Investigate the two CHECKMEs about bdb_close_cursor in fbdb.c:ix_bdb_write_internal

- Investigate the CHECKMEs in typeck.c:validate_move and in particular why it was necessary to add CB_LITERAL_P (checks to add in parser)

- Investigate the CHECKME about the need for comma in move.c:cob_move_display_to_edited (first in GC 3.x)

- Investigate the CHECKME about moving cob_set_exception call in common.c:cob_module_global_enter

- Check the TODO about cb_default_byte in codegen.c:output_initialize

- Make status an enum instead of an int in fileio.c:cob_file_save_status as per TODO

- Move the IO status codes from common.h to fileio.h as per TODO

- Check the #if-0'ed code in field.c:validate_field_value

- Check the #if-0'ed code for setting last_exception_source in common.c:cob_set_exception

- Check the #if-0'ed code about EOP exception in fileio.c:cob_file_save_status

7.3 Other issues

- Investigate the need to define READ_WRITE_NEEDS_FLUSH under MacOS ("LINE SEQUENTIAL COMMIT / ROLLBACK" test fails if not defined)

- Check if should use strcpy or memcpy with computed max-length for file_open_name in fileio.c:cob_open

- Check what we should do about the casts used to remove const on open_mode in fileio.c and others (eg. in cob_file_open)
4 changes: 4 additions & 0 deletions build_windows/ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
* makedist.cmd: first addition for CI output
* 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

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

* version_cobfile.rc: new file
Expand Down
2 changes: 2 additions & 0 deletions build_windows/ocide/libcob.dll.cpj
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@
<FILE NAME="..\..\libcob\fileio.h" TITLE="fileio.h" CLEAN="0"/>
<FILE NAME="..\..\libcob\system.def" TITLE="system.def" CLEAN="0"/>
<FILE NAME="..\..\tarstamp.h" TITLE="tarstamp.h" CLEAN="0"/>
<FILE NAME="..\..\version.h" TITLE="version.h" CLEAN="0"/>
</FOLDER>
<FOLDER TITLE="Resource Files">
<FILE NAME="..\version_libcob.rc" TITLE="version_libcob.rc" CLEAN="0"/>
</FOLDER>
<FOLDER TITLE="Source Files">
<FILE NAME="..\..\libcob\call.c" TITLE="call.c" CLEAN="0"/>
<FILE NAME="..\..\libcob\cconv.c" TITLE="cconv.c" CLEAN="0"/>
<FILE NAME="..\..\libcob\cobcapi.c" TITLE="cobcapi.c" CLEAN="0"/>
<FILE NAME="..\..\libcob\cobgetopt.c" TITLE="cobgetopt.c" CLEAN="0"/>
<FILE NAME="..\..\libcob\common.c" TITLE="common.c" CLEAN="0"/>
Expand Down
8 changes: 0 additions & 8 deletions build_windows/vs2008/cobc.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,6 @@
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\cobc\cconv.c"
>
</File>
<File
RelativePath="..\..\cobc\cobc.c"
>
Expand Down Expand Up @@ -337,10 +333,6 @@
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\cobc\cconv.h"
>
</File>
<File
RelativePath="..\..\cobc\cobc.h"
>
Expand Down
4 changes: 4 additions & 0 deletions build_windows/vs2008/libcob.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@
RelativePath="..\..\libcob\call.c"
>
</File>
<File
RelativePath="..\..\libcob\cconv.c"
>
</File>
<File
RelativePath="..\..\libcob\cobcapi.c"
>
Expand Down
2 changes: 0 additions & 2 deletions build_windows/vs2010/cobc.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\cobc\cobc.c" />
<ClCompile Include="..\..\cobc\cconv.c" />
<ClCompile Include="..\..\cobc\codegen.c" />
<ClCompile Include="..\..\cobc\codeoptim.c" />
<ClCompile Include="..\..\cobc\config.c" />
Expand Down Expand Up @@ -333,7 +332,6 @@
<ClInclude Include="..\config.h" />
<ClInclude Include="..\..\libcob.h" />
<ClInclude Include="..\..\tarstamp.h" />
<ClInclude Include="..\..\cobc\cconv.h" />
<ClInclude Include="..\..\cobc\cobc.h" />
<ClInclude Include="..\..\cobc\tree.h" />
<ClInclude Include="..\..\cobc\parser.h" />
Expand Down
6 changes: 0 additions & 6 deletions build_windows/vs2010/cobc.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@
<ClCompile Include="..\..\cobc\cobc.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\cobc\cconv.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\cobc\codegen.c">
<Filter>Source Files</Filter>
</ClCompile>
Expand Down Expand Up @@ -251,9 +248,6 @@
<ClInclude Include="..\..\cobc\cobc.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\cobc\cconv.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\libcob\common.h">
<Filter>Header Files</Filter>
</ClInclude>
Expand Down
4 changes: 3 additions & 1 deletion build_windows/vs2010/libcob.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\libcob\call.c" />
<ClCompile Include="..\..\libcob\cconv.c" />
<ClCompile Include="..\..\libcob\cobcapi.c" />
<ClCompile Include="..\..\libcob\cobgetopt.c" />
<ClCompile Include="..\..\libcob\common.c" />
Expand All @@ -192,6 +193,7 @@
<ClCompile Include="..\..\libcob\termio.c" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\config\runtime.cfg" />
<None Include="..\..\libcob\exception.def" />
<None Include="..\..\libcob\statement.def" />
<None Include="..\..\libcob\system.def" />
Expand Down Expand Up @@ -219,4 +221,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
4 changes: 4 additions & 0 deletions build_windows/vs2010/libcob.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
<ClCompile Include="..\..\libcob\call.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\libcob\cconv.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\libcob\cobgetopt.c">
<Filter>Source Files</Filter>
</ClCompile>
Expand Down Expand Up @@ -119,6 +122,7 @@
<Filter>Header Files</Filter>
</None>
<None Include="..\..\libcob\ChangeLog" />
<None Include="..\..\config\runtime.cfg" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\version_libcob.rc">
Expand Down
2 changes: 0 additions & 2 deletions build_windows/vs2012/cobc.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\cobc\cobc.c" />
<ClCompile Include="..\..\cobc\cconv.c" />
<ClCompile Include="..\..\cobc\codegen.c" />
<ClCompile Include="..\..\cobc\codeoptim.c" />
<ClCompile Include="..\..\cobc\config.c" />
Expand Down Expand Up @@ -337,7 +336,6 @@
<ClInclude Include="..\config.h" />
<ClInclude Include="..\..\libcob.h" />
<ClInclude Include="..\..\tarstamp.h" />
<ClInclude Include="..\..\cobc\cconv.h" />
<ClInclude Include="..\..\cobc\cobc.h" />
<ClInclude Include="..\..\cobc\tree.h" />
<ClInclude Include="..\..\cobc\parser.h" />
Expand Down
Loading

0 comments on commit deb74ac

Please sign in to comment.