GCC Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
cobol Performance Win

GCC Cobol gains speedups, function prototypes, POSIX compatibility.

This commit improves the execution speed of arithmetic operations and file reads in GCC Cobol, adds function prototypes, and starts implementing a POSIX compat…

This commit brings several improvements to GCC Cobol, including faster execution of ADD and SUBTRACT operations with small integer constants on Numeric Display types via specialized code generation. File READ operations on line-sequential files now use a 64K read buffer for increased speed. The compiler now supports COBOL function prototypes. This commit also lays the foundation for a POSIX compatibility layer and introduces a mechanism to detect missing LABEL_EXPR for better code analysis.

In Details

This commit touches multiple parts of the Cobol compiler. Optimizations in genmath.cc improve ADD and SUBTRACT performance with small integer constants for Numeric Display vars. FILE READ performance benefits from a 64K buffer. POSIX compatibility is managed through gcobolspec.cc and related files. Missing LABEL_EXPR detection is added throughout the code generator. The changes involve Make-lang.in, cdf.y, cobol1.cc, compare.cc, copybook.h, dts.h, gcobc, gcobol.1, gcobol.3, gcobolspec.cc, genapi.cc, and gengen.cc.

For Context

GCC Cobol is the Cobol compiler integrated into the GNU Compiler Collection (GCC). This commit enhances the compiler's performance and capabilities. Cobol is a programming language mainly used for business, finance and administrative systems. POSIX compatibility enables Cobol programs to interact more easily with POSIX-compliant operating systems. The changes introduced affect the compilation process, code generation, and runtime behavior of Cobol programs.

Filed Under: coboloptimizationposixfunction prototypes