Patches Posted For Review Adding COBOL Frontend To GCC Compiler
([GNU] 6 Hours Ago
COBOL For GCC)
- Reference: 0001512380
- News link: https://www.phoronix.com/news/COBOL-For-GCC-Patches-EOY2024
- Source link:
The COBOL programming language may be 65 years old since its original release but the mainline GNU Compiler Collection (GCC) in 2025 might finally see upstream support for it.
The GNU Compiler Collection is predominantly known for its C, C++, and Fortran language front-ends but there's been much activity in recent years around the Rust "gccrs" support as well as Ada, D, and Go. There has been [1]out-of-tree GCC support for COBOL and that is working its way toward the mainline compiler codebase.
Sent out this morning were [2]8 patches for review that establish all the files needed to build and use the COBOL front-end with GCC plus the associated documentation.
James Lowden sent out the GCC COBOL patches for discussion and commented on the patch cover letter:
"A word about C style, always a lively topic. For any files already present in gcc, the existing style was followed, and any variation from it is unintentional. Files related to the parser use K&R style. The GENERIC interface and runtime library use Whitesmiths style. All C++ code uses spaces for indentation.
The COBOL front end has been and is being written by two guys with decades of experience. We hope the code is a testament to that experience. Our relatively recent experience, these last four years, is that it has been more productive to keep using the styles to which we've long become accustomed. The position of curly braces is hardly any hindrance to read another's code, but it's a burden to write that way. We think, 83,068 lines later, the proof of the pudding is in the eating."
The project site for the GCC COBOL out-of-tree support up to this point can be found via [3]cobolworx.com .
Now to see if this COBOL front-end is in good enough shape for upstreaming into the GCC compiler six decades after the debut of this programming language.
[1] https://www.phoronix.com/news/GCC-COBOL-2023
[2] https://gcc.gnu.org/pipermail/gcc-patches/2024-December/671607.html
[3] https://cobolworx.com/pages/cobforgcc.html
The GNU Compiler Collection is predominantly known for its C, C++, and Fortran language front-ends but there's been much activity in recent years around the Rust "gccrs" support as well as Ada, D, and Go. There has been [1]out-of-tree GCC support for COBOL and that is working its way toward the mainline compiler codebase.
Sent out this morning were [2]8 patches for review that establish all the files needed to build and use the COBOL front-end with GCC plus the associated documentation.
James Lowden sent out the GCC COBOL patches for discussion and commented on the patch cover letter:
"A word about C style, always a lively topic. For any files already present in gcc, the existing style was followed, and any variation from it is unintentional. Files related to the parser use K&R style. The GENERIC interface and runtime library use Whitesmiths style. All C++ code uses spaces for indentation.
The COBOL front end has been and is being written by two guys with decades of experience. We hope the code is a testament to that experience. Our relatively recent experience, these last four years, is that it has been more productive to keep using the styles to which we've long become accustomed. The position of curly braces is hardly any hindrance to read another's code, but it's a burden to write that way. We think, 83,068 lines later, the proof of the pudding is in the eating."
The project site for the GCC COBOL out-of-tree support up to this point can be found via [3]cobolworx.com .
Now to see if this COBOL front-end is in good enough shape for upstreaming into the GCC compiler six decades after the debut of this programming language.
[1] https://www.phoronix.com/news/GCC-COBOL-2023
[2] https://gcc.gnu.org/pipermail/gcc-patches/2024-December/671607.html
[3] https://cobolworx.com/pages/cobforgcc.html
bug77