public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* gcc cobol status
@ 2023-11-13 21:36 James K. Lowden
  0 siblings, 0 replies; only message in thread
From: James K. Lowden @ 2023-11-13 21:36 UTC (permalink / raw)
  To: gcc

When in November we turn back our clocks, then naturally do
programmers' thoughts turn to Cobol, its promise, and future.  

At last post, nine months ago, we were working our way through the
NIST CCVS/85 test suite.  I am pleased to report that process is
complete.  As far as NIST is concerned, gcobol is a Cobol compiler.  

For those keeping score at home, we're at 656 terminal symbols and
1636 yacc rules. Cobol is nothing if not a big language.  

NIST CCVS/85 includes: 

	Basic Cobol grammar
	Intrinsic functions
	IPC support, in the form of called by and calling C modules
	I/O for sequential, indexed, and relative-addressed files
	Sorting and merging of files
	Compiler Directing Facility functions

The NIST tests can be downloaded and executed using an included
Makefile.  They comprise 8846 tests in 348 files.

We have adopted the ISO 2023 Cobol specification as the standard we're
writing to.  gcobol also includes a few extensions to support syntax
that is specific to IBM and MicroFocus compilers, for features that are
widely used or still in use but since dropped by ISO.  

Significant effort went, and continues to go, into a relatively
new Cobol feature, not part of the 1985 standard: handling Exception
Conditions. Good examples are scarce, though, and we would be pleased
to work with anyone whose code depends on correct EC handling, or who
would like to use it and cannot because their compiler doesn't support
it.  

Cobol also has quite requirements for numerical precision.  To that
end, gcobol now uses the C _Float128 datatype.  The precision of
intermediate computed results grows as needed, and overflows and
truncation are signified (if enabled) through the EC mechanism. The
switch to _Float128 was a third pass over the computation statements
(ADD, SUBTRACT, MULTIPLY, DIVIDE, and COMPUTE) and the lucky user
benefits from our hard-won experience, in the form of much better
performance.  

Of course, no battle plan survives first contact with the enemy.  As the
gcobol community grows and new erroneous code is encountered, the
compiler's error messages continue to improve.  


Plans.

We want the direction of gcobol to be influenced by user interest.
Every Cobol shop relies on different variations and extensions to the
language. Early adopters have an opportunity to make their voices heard
and needs met.  Operators are standing by.  

On deck for 2024:

    * User acceptance testing
    * support for EXEC SQL
    * modifications consequent to GCC review 
    * updated gdb support

Home page: 
	https://www.cobolworx.com/pages/cobforgcc.html
Packages:
	https://gitlab.cobolworx.com/COBOLworx/gcc-cobol/-/packages/2
Repository, and Issue tracker:
	https://gitlab.cobolworx.com/COBOLworx/gcc-cobol/-/tree/master+cobol

We are: 
  *  James K. Lowden  <jklowden@symas.com>
	Front of the front-end: lexer and parser
  *  Robert Dubner <rdubner@symas.com>
	Back of the front-end: adapting Cobol to Gimple

Thank you for you kind attention.

--jkl

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-14 19:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-13 21:36 gcc cobol status James K. Lowden

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).